@@ -353,11 +353,7 @@ require('lazy').setup({
353
353
354
354
-- Document existing key chains
355
355
spec = {
356
- { ' <leader>c' , group = ' [C]ode' , mode = { ' n' , ' x' } },
357
- { ' <leader>d' , group = ' [D]ocument' },
358
- { ' <leader>r' , group = ' [R]ename' },
359
356
{ ' <leader>s' , group = ' [S]earch' },
360
- { ' <leader>w' , group = ' [W]orkspace' },
361
357
{ ' <leader>t' , group = ' [T]oggle' },
362
358
{ ' <leader>h' , group = ' Git [H]unk' , mode = { ' n' , ' v' } },
363
359
},
@@ -549,42 +545,42 @@ require('lazy').setup({
549
545
vim .keymap .set (mode , keys , func , { buffer = event .buf , desc = ' LSP: ' .. desc })
550
546
end
551
547
552
- -- Jump to the definition of the word under your cursor.
553
- -- This is where a variable was first declared, or where a function is defined, etc.
554
- -- To jump back, press <C-t>.
555
- map (' gd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
548
+ -- Rename the variable under your cursor.
549
+ -- Most Language Servers support renaming across files, etc.
550
+ map (' grn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
551
+
552
+ -- Execute a code action, usually your cursor needs to be on top of an error
553
+ -- or a suggestion from your LSP for this to activate.
554
+ map (' gra' , vim .lsp .buf .code_action , ' [G]oto Code [A]ction' , { ' n' , ' x' })
556
555
557
556
-- Find references for the word under your cursor.
558
- map (' gr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
557
+ map (' grr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
559
558
560
559
-- Jump to the implementation of the word under your cursor.
561
560
-- Useful when your language has ways of declaring types without an actual implementation.
562
- map (' gI ' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
561
+ map (' gri ' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
563
562
564
- -- Jump to the type of the word under your cursor.
565
- -- Useful when you're not sure what type a variable is and you want to see
566
- -- the definition of its *type*, not where it was *defined*.
567
- map (' <leader>D' , require (' telescope.builtin' ).lsp_type_definitions , ' Type [D]efinition' )
563
+ -- Jump to the definition of the word under your cursor.
564
+ -- This is where a variable was first declared, or where a function is defined, etc.
565
+ -- To jump back, press <C-t>.
566
+ map (' grd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
567
+
568
+ -- WARN: This is not Goto Definition, this is Goto Declaration.
569
+ -- For example, in C this would take you to the header.
570
+ map (' grD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
568
571
569
572
-- Fuzzy find all the symbols in your current document.
570
573
-- Symbols are things like variables, functions, types, etc.
571
- map (' <leader>ds ' , require (' telescope.builtin' ).lsp_document_symbols , ' [D]ocument [S]ymbols ' )
574
+ map (' gO ' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Symbols ' )
572
575
573
576
-- Fuzzy find all the symbols in your current workspace.
574
577
-- Similar to document symbols, except searches over your entire project.
575
- map (' <leader>ws' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' [W]orkspace [S]ymbols' )
576
-
577
- -- Rename the variable under your cursor.
578
- -- Most Language Servers support renaming across files, etc.
579
- map (' <leader>rn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
580
-
581
- -- Execute a code action, usually your cursor needs to be on top of an error
582
- -- or a suggestion from your LSP for this to activate.
583
- map (' <leader>ca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
578
+ map (' gW' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' Open Workspace Symbols' )
584
579
585
- -- WARN: This is not Goto Definition, this is Goto Declaration.
586
- -- For example, in C this would take you to the header.
587
- map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
580
+ -- Jump to the type of the word under your cursor.
581
+ -- Useful when you're not sure what type a variable is and you want to see
582
+ -- the definition of its *type*, not where it was *defined*.
583
+ map (' grt' , require (' telescope.builtin' ).lsp_type_definitions , ' [G]oto [T]ype Definition' )
588
584
589
585
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
590
586
--- @param client vim.lsp.Client
0 commit comments