2023-05-04 12:39:25 +01:00
|
|
|
return {
|
|
|
|
"folke/trouble.nvim",
|
2023-05-31 16:47:30 +01:00
|
|
|
cond = not vim.g.vscode,
|
2023-05-04 12:39:25 +01:00
|
|
|
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>")
|
2023-05-17 14:57:53 +01:00
|
|
|
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,
|
2023-05-17 14:57:53 +01:00
|
|
|
auto_jump = { "lsp_definitions" },
|
|
|
|
use_diagnostic_signs = true,
|
2023-05-16 09:22:33 +01:00
|
|
|
},
|
2023-05-04 12:39:25 +01:00
|
|
|
}
|