diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 5ba5bec..f549f7c 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -69,16 +69,16 @@ return { map('ca', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) -- Find references for the word under your cursor. - map('grr', Snacks.picker.lsp_references, '[G]oto [R]eferences') + map('grr', function() Snacks.picker.lsp_references() end, '[G]oto [R]eferences') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. - map('gri', Snacks.picker.lsp_implementations, '[G]oto [I]mplementation') + map('gri', function() Snacks.picker.lsp_implementations() end, '[G]oto [I]mplementation') -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', Snacks.picker.lsp_definitions, '[G]oto [D]efinition') + map('grd', function() Snacks.picker.lsp_definitions() end, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -86,16 +86,16 @@ return { -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. - map('gO', Snacks.picker.lsp_symbols, 'Open Document Symbols') + map('gO', function() Snacks.picker.lsp_symbols() end, 'Open Document Symbols') -- Fuzzy find all the symbols in your current workspace. -- Similar to document symbols, except searches over your entire project. - map('gW', Snacks.picker.lsp_workspace_symbols, 'Open Workspace Symbols') + map('gW', function() Snacks.picker.lsp_workspace_symbols() end, 'Open Workspace Symbols') -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see -- the definition of its *type*, not where it was *defined*. - map('grt', Snacks.picker.lsp_type_definitions, '[G]oto [T]ype Definition') + map('grt', function() Snacks.picker.lsp_type_definitions() end, '[G]oto [T]ype Definition') -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) ---@param client vim.lsp.Client