@@ -598,42 +598,56 @@ require('lazy').setup({
598
598
vim .keymap .set (mode , keys , func , { buffer = event .buf , desc = ' LSP: ' .. desc })
599
599
end
600
600
601
+ -- NOTE:
602
+ -- With Neovim v0.11 `gr` is a prefix for a bunch of code actions
603
+ -- https://github.com/nvim-lua/kickstart.nvim/pull/1427
604
+ -- Commented out the old mapping, let's see how it evolves..
605
+
601
606
-- Jump to the definition of the word under your cursor.
602
607
-- This is where a variable was first declared, or where a function is defined, etc.
603
608
-- To jump back, press <C-t>.
604
609
map (' gd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
610
+ map (' grd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
611
+
612
+ -- Rename the variable under your cursor.
613
+ -- Most Language Servers support renaming across files, etc.
614
+ -- map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
615
+ map (' grn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
616
+
617
+ -- Execute a code action, usually your cursor needs to be on top of an error
618
+ -- or a suggestion from your LSP for this to activate.
619
+ -- map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
620
+ map (' gra' , vim .lsp .buf .code_action , ' [G]oto Code [A]ction' , { ' n' , ' x' })
605
621
606
622
-- Find references for the word under your cursor.
607
- map (' gr' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
623
+ -- map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
624
+ map (' grr' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
608
625
609
626
-- Jump to the implementation of the word under your cursor.
610
627
-- Useful when your language has ways of declaring types without an actual implementation.
611
- map (' gI' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
628
+ -- map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
629
+ map (' gri' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
630
+
631
+ -- WARN: This is not Goto Definition, this is Goto Declaration.
632
+ -- For example, in C this would take you to the header.
633
+ -- map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
634
+ map (' grD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
612
635
613
636
-- Jump to the type of the word under your cursor.
614
637
-- Useful when you're not sure what type a variable is and you want to see
615
638
-- the definition of its *type*, not where it was *defined*.
616
- map (' <leader>D' , require (' telescope.builtin' ).lsp_type_definitions , ' Type [D]efinition' )
639
+ -- map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
640
+ map (' grt' , require (' telescope.builtin' ).lsp_type_definitions , ' [G]oto [T]ype Definition' )
617
641
618
642
-- Fuzzy find all the symbols in your current document.
619
643
-- Symbols are things like variables, functions, types, etc.
620
- map (' <leader>ds' , require (' telescope.builtin' ).lsp_document_symbols , ' [D]ocument [S]ymbols' )
644
+ -- map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
645
+ map (' gO' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Symbols' )
621
646
622
647
-- Fuzzy find all the symbols in your current workspace.
623
648
-- Similar to document symbols, except searches over your entire project.
624
- map (' <leader>Ws' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' [W]orkspace [S]ymbols' )
625
-
626
- -- Rename the variable under your cursor.
627
- -- Most Language Servers support renaming across files, etc.
628
- map (' <leader>rn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
629
-
630
- -- Execute a code action, usually your cursor needs to be on top of an error
631
- -- or a suggestion from your LSP for this to activate.
632
- map (' <leader>ca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
633
-
634
- -- WARN: This is not Goto Definition, this is Goto Declaration.
635
- -- For example, in C this would take you to the header.
636
- map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
649
+ -- map('<leader>Ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
650
+ map (' gW' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' Open Workspace Symbols' )
637
651
638
652
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
639
653
--- @param client vim.lsp.Client
0 commit comments