@@ -336,9 +336,6 @@ require('lazy').setup({
336
336
337
337
-- Document existing key chains
338
338
spec = {
339
- { ' <leader>c' , group = ' [C]ode' , mode = { ' n' , ' x' } },
340
- { ' <leader>d' , group = ' [D]ocument' },
341
- { ' <leader>r' , group = ' [R]ename' },
342
339
{ ' <leader>s' , group = ' [S]earch' },
343
340
{ ' <leader>w' , group = ' [W]orkspace' },
344
341
{ ' <leader>t' , group = ' [T]oggle' },
@@ -532,39 +529,39 @@ require('lazy').setup({
532
529
vim .keymap .set (mode , keys , func , { buffer = event .buf , desc = ' LSP: ' .. desc })
533
530
end
534
531
535
- -- Jump to the definition of the word under your cursor.
536
- -- This is where a variable was first declared, or where a function is defined, etc.
537
- -- To jump back, press <C-t>.
538
- map (' gd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
532
+ -- Rename the variable under your cursor.
533
+ -- Most Language Servers support renaming across files, etc.
534
+ map (' grn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
535
+
536
+ -- Execute a code action, usually your cursor needs to be on top of an error
537
+ -- or a suggestion from your LSP for this to activate.
538
+ map (' gca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
539
539
540
540
-- Find references for the word under your cursor.
541
- map (' gr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
541
+ map (' grr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
542
542
543
543
-- Jump to the implementation of the word under your cursor.
544
544
-- Useful when your language has ways of declaring types without an actual implementation.
545
- map (' gI' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
545
+ map (' gri' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
546
+
547
+ -- Fuzzy find all the symbols in your current document.
548
+ -- Symbols are things like variables, functions, types, etc.
549
+ map (' gO' , require (' telescope.builtin' ).lsp_document_symbols , ' [O]pen Document Symbols' )
550
+
551
+ -- Jump to the definition of the word under your cursor.
552
+ -- This is where a variable was first declared, or where a function is defined, etc.
553
+ -- To jump back, press <C-t>.
554
+ map (' gd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
546
555
547
556
-- Jump to the type of the word under your cursor.
548
557
-- Useful when you're not sure what type a variable is and you want to see
549
558
-- the definition of its *type*, not where it was *defined*.
550
559
map (' <leader>D' , require (' telescope.builtin' ).lsp_type_definitions , ' Type [D]efinition' )
551
560
552
- -- Fuzzy find all the symbols in your current document.
553
- -- Symbols are things like variables, functions, types, etc.
554
- map (' <leader>ds' , require (' telescope.builtin' ).lsp_document_symbols , ' [D]ocument [S]ymbols' )
555
-
556
561
-- Fuzzy find all the symbols in your current workspace.
557
562
-- Similar to document symbols, except searches over your entire project.
558
563
map (' <leader>ws' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' [W]orkspace [S]ymbols' )
559
564
560
- -- Rename the variable under your cursor.
561
- -- Most Language Servers support renaming across files, etc.
562
- map (' <leader>rn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
563
-
564
- -- Execute a code action, usually your cursor needs to be on top of an error
565
- -- or a suggestion from your LSP for this to activate.
566
- map (' <leader>ca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
567
-
568
565
-- WARN: This is not Goto Definition, this is Goto Declaration.
569
566
-- For example, in C this would take you to the header.
570
567
map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
0 commit comments