diff options
author | Yigit Sever | 2024-08-30 09:58:14 +0200 |
---|---|---|
committer | Yigit Sever | 2024-08-30 09:58:14 +0200 |
commit | ec1864f403819346bd4445783959e4be083b0a61 (patch) | |
tree | 8009ff07eacffb13b0a404e643c9d7bad8a929a9 /.config/nvim | |
parent | ed96cb979fbea09f801fa78e86a56684bcb38467 (diff) | |
download | dotfiles-ec1864f403819346bd4445783959e4be083b0a61.tar.gz dotfiles-ec1864f403819346bd4445783959e4be083b0a61.tar.bz2 dotfiles-ec1864f403819346bd4445783959e4be083b0a61.zip |
nvim: update trouble config
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/plugins/trouble.lua | 45 |
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 @@ | |||
1 | return { | 1 | return { |
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 | } |