assign general lsp commands to correct group

This commit is contained in:
Nick Burt 2026-07-01 15:23:01 -05:00
parent 10b75f8e09
commit 3726a1656b
1 changed files with 6 additions and 6 deletions

View File

@ -546,29 +546,29 @@ do
local buf = event.buf local buf = event.buf
-- Find references for the word under your cursor. -- Find references for the word under your cursor.
vim.keymap.set('n', 'grr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) vim.keymap.set('n', '<leader>cgr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' })
-- Jump to the implementation of the word under your cursor. -- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation. -- Useful when your language has ways of declaring types without an actual implementation.
vim.keymap.set('n', 'gri', builtin.lsp_implementations, { buffer = buf, desc = '[G]oto [I]mplementation' }) vim.keymap.set('n', '<leader>cgi', builtin.lsp_implementations, { buffer = buf, desc = '[G]oto [I]mplementation' })
-- Jump to the definition of the word under your cursor. -- 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. -- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>. -- To jump back, press <C-t>.
vim.keymap.set('n', 'grd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' }) vim.keymap.set('n', '<leader>cgd', builtin.lsp_definitions, { buffer = buf, desc = '[G]oto [D]efinition' })
-- Fuzzy find all the symbols in your current document. -- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc. -- Symbols are things like variables, functions, types, etc.
vim.keymap.set('n', 'gO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' }) vim.keymap.set('n', '<leader>cgO', builtin.lsp_document_symbols, { buffer = buf, desc = 'Open Document Symbols' })
-- Fuzzy find all the symbols in your current workspace. -- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project. -- Similar to document symbols, except searches over your entire project.
vim.keymap.set('n', 'gW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' }) vim.keymap.set('n', '<leader>cgW', builtin.lsp_dynamic_workspace_symbols, { buffer = buf, desc = 'Open Workspace Symbols' })
-- Jump to the type of the word under your cursor. -- 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 -- 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*. -- the definition of its *type*, not where it was *defined*.
vim.keymap.set('n', 'grt', builtin.lsp_type_definitions, { buffer = buf, desc = '[G]oto [T]ype Definition' }) vim.keymap.set('n', '<leader>cgt', builtin.lsp_type_definitions, { buffer = buf, desc = '[G]oto [T]ype Definition' })
end, end,
}) })