File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ return {
2
+ ' folke/trouble.nvim' ,
3
+ dependencies = { ' nvim-tree/nvim-web-devicons' },
4
+ opts = {},
5
+ config = function ()
6
+ local function mapLeader (key , troubleFunc , description )
7
+ vim .keymap .set (' n' , ' <leader>' .. key , function ()
8
+ require (' trouble' ).toggle (troubleFunc )
9
+ end , { desc = description })
10
+ end
11
+
12
+ -- Utilizzo della funzione mapLeader per definire i mapping
13
+ mapLeader (' xx' , nil , ' Toggle Trouble' )
14
+ mapLeader (' xw' , ' workspace_diagnostics' , ' Toggle Workspace Diagnostics' )
15
+ mapLeader (' xd' , ' document_diagnostics' , ' Toggle Document Diagnostics' )
16
+ mapLeader (' xq' , ' quickfix' , ' Toggle Quickfix' )
17
+ mapLeader (' xl' , ' loclist' , ' Toggle Location List' )
18
+
19
+ vim .keymap .set (' n' , ' gR' , function ()
20
+ require (' trouble' ).toggle ' lsp_references'
21
+ end )
22
+ end ,
23
+ }
You can’t perform that action at this time.
0 commit comments