nvim/lua/plugins/trouble.lua

24 lines
892 B
Lua
Raw Normal View History

return {
"folke/trouble.nvim",
cond = not vim.g.vscode,
dependencies = "nvim-tree/nvim-web-devicons",
cmd = "TroubleToggle",
2023-05-16 09:22:33 +01:00
init = function()
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>")
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>")
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>")
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>")
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
vim.keymap.set("n", "gR", "<cmd>TroubleToggle lsp_references<cr>")
2023-05-16 09:22:33 +01:00
end,
config = true,
opts = {
mode = "workspace_diagnostics",
auto_open = false,
auto_close = false,
auto_preview = true,
auto_jump = { "lsp_definitions" },
use_diagnostic_signs = true,
2023-05-16 09:22:33 +01:00
},
}