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