@@ -72,42 +72,42 @@ return {
7272 vim .keymap .set (mode , keys , func , { buffer = event .buf , desc = ' LSP: ' .. desc })
7373 end
7474
75- -- Jump to the definition of the word under your cursor.
76- -- This is where a variable was first declared, or where a function is defined, etc.
77- -- To jump back, press <C-t>.
78- map (' gd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
75+ -- Rename the variable under your cursor.
76+ -- Most Language Servers support renaming across files, etc.
77+ map (' grn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
78+
79+ -- Execute a code action, usually your cursor needs to be on top of an error
80+ -- or a suggestion from your LSP for this to activate.
81+ map (' gra' , vim .lsp .buf .code_action , ' [G]oto Code [A]ction' , { ' n' , ' x' })
7982
8083 -- Find references for the word under your cursor.
81- map (' gr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
84+ map (' grr ' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
8285
8386 -- Jump to the implementation of the word under your cursor.
8487 -- Useful when your language has ways of declaring types without an actual implementation.
85- map (' gI ' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
88+ map (' gri ' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
8689
87- -- Jump to the type of the word under your cursor.
88- -- Useful when you're not sure what type a variable is and you want to see
89- -- the definition of its *type*, not where it was *defined*.
90- map (' <leader>D' , require (' telescope.builtin' ).lsp_type_definitions , ' Type [D]efinition' )
90+ -- Jump to the definition of the word under your cursor.
91+ -- This is where a variable was first declared, or where a function is defined, etc.
92+ -- To jump back, press <C-t>.
93+ map (' grd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
94+
95+ -- WARN: This is not Goto Definition, this is Goto Declaration.
96+ -- For example, in C this would take you to the header.
97+ map (' grD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
9198
9299 -- Fuzzy find all the symbols in your current document.
93100 -- Symbols are things like variables, functions, types, etc.
94- map (' <leader>ds ' , require (' telescope.builtin' ).lsp_document_symbols , ' [D]ocument [S]ymbols ' )
101+ map (' gO ' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Symbols ' )
95102
96103 -- Fuzzy find all the symbols in your current workspace.
97104 -- Similar to document symbols, except searches over your entire project.
98- map (' <leader>ws' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' [W]orkspace [S]ymbols' )
99-
100- -- Rename the variable under your cursor.
101- -- Most Language Servers support renaming across files, etc.
102- map (' <leader>rn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
103-
104- -- Execute a code action, usually your cursor needs to be on top of an error
105- -- or a suggestion from your LSP for this to activate.
106- map (' <leader>ca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
105+ map (' gW' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' Open Workspace Symbols' )
107106
108- -- WARN: This is not Goto Definition, this is Goto Declaration.
109- -- For example, in C this would take you to the header.
110- map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
107+ -- Jump to the type of the word under your cursor.
108+ -- Useful when you're not sure what type a variable is and you want to see
109+ -- the definition of its *type*, not where it was *defined*.
110+ map (' grt' , require (' telescope.builtin' ).lsp_type_definitions , ' [G]oto [T]ype Definition' )
111111
112112 -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
113113 --- @param client vim.lsp.Client
0 commit comments