summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/lua/plugins/trouble.lua45
1 files changed, 33 insertions, 12 deletions
diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua
index b80aed3..c11778c 100644
--- a/.config/nvim/lua/plugins/trouble.lua
+++ b/.config/nvim/lua/plugins/trouble.lua
@@ -1,16 +1,37 @@
1return { 1return {
2 "folke/trouble.nvim", 2 "folke/trouble.nvim",
3 dependencies = { "nvim-tree/nvim-web-devicons" }, 3 cmd = "Trouble",
4 opts = {}, 4 opts = {},
5 config = function() 5 keys = {
6 local map = require("helpers.keys").map 6 {
7 map("n", "<leader>xx", function() require("trouble").open() end, "trouble: open") 7 "<leader>xx",
8 map("n", "<leader>xw", function() require("trouble").open("workspace_diagnostics") end, 8 "<cmd>Trouble diagnostics toggle<cr>",
9 "trouble: open workspace diagnostics") 9 desc = "Diagnostics (Trouble)",
10 map("n", "<leader>xd", function() require("trouble").open("document_diagnostics") end, 10 },
11 "trouble: open document diagnostics") 11 {
12 map("n", "<leader>xq", function() require("trouble").open("quickfix") end, "trouble: open quickfix") 12 "<leader>xX",
13 map("n", "<leader>xl", function() require("trouble").open("loclist") end, "trouble: open loclist") 13 "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
14 map("n", "gR", function() require("trouble").open("lsp_references") end, "trouble: open lsp references") 14 desc = "Buffer Diagnostics (Trouble)",
15 end, 15 },
16 {
17 "<leader>cs",
18 "<cmd>Trouble symbols toggle focus=false<cr>",
19 desc = "Symbols (Trouble)",
20 },
21 {
22 "<leader>cl",
23 "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
24 desc = "LSP Definitions / references / ... (Trouble)",
25 },
26 {
27 "<leader>xL",
28 "<cmd>Trouble loclist toggle<cr>",
29 desc = "Location List (Trouble)",
30 },
31 {
32 "<leader>xQ",
33 "<cmd>Trouble qflist toggle<cr>",
34 desc = "Quickfix List (Trouble)",
35 },
36 },
16} 37}