lsp‐defaults - bdatko/nvim GitHub Wiki
- Originally found these mappings, here
- default mappings were added after release of v0.10.0, in PR #28650: add LSP default mappings (again)
"key maps created unconditionally"
Below are the global defaults from >v0.10.0
- "grn" is mapped in Normal mode to vim.lsp.buf.rename()
- "gra" is mapped in Normal and Visual mode to vim.lsp.buf.code_action()
- "grr" is mapped in Normal mode to vim.lsp.buf.references()
- "gri" is mapped in Normal mode to vim.lsp.buf.implementation()
- "grt" is mapped in Normal mode to vim.lsp.buf.type_definition()
- "gO" is mapped in Normal mode to vim.lsp.buf.document_symbol()
- CTRL-S is mapped in Insert mode to vim.lsp.buf.signature_help()
- "an" and "in" are mapped in Visual mode to outer and inner incremental selections, respectively, using vim.lsp.buf.selection_range()
keymap | LSP | From kickstarter.nvim on "LspAttach" |
---|---|---|
grn |
textDocument/rename |
Rename |
gra |
textDocument/codeAction |
Code Action |
grr |
textDocument/references |
Goto Reference lsp_reference - vim.lsp.buf.reference
|
gri |
textDocument/implementation |
Goto Implementation - lsp_implementation - buf.implemenation
|
gO |
textDocument/documentSymbol |
Document Symbols - lsp_document_symbols
|
<CTRL-S> |
textDocument/signatureHelp |
Trying to remap, some of this is older I originally did this on 2024-12-23
Name | lsp-defaults |
kickstart.nvim (old) |
vim.lsp.buff.lsp-defaults API |
kickstart API |
---|---|---|---|---|
Rename | grn |
rn |
.rename |
vim.lsp.buf |
Code Action | gra |
<leader>ca |
.code_action |
vim.lsp.buf |
References | grr |
gr |
.lsp_references (quickfix) |
require('telescope.builtin') |
Implementation | gri |
gI |
.lsp_implementations (quickfix) |
require('telescope.builtin') |
Document Symbol | gO |
<leader>ds |
.lsp_document_symbols (quickfix) |
require('telescope.builtin') |
Signature Help | <CTRL-S> |
signature_help | ||
Definition | grd |
gd |
.lsp_definitions |
require('telescope.builtin') |
Type Definition | grt |
<leader>D |
.lsp_type_definitions |
require('telescope.builtin') |
Workspace Symbol | gwO |
<leader>ws |
.lsp_dynamic_workspace_symbols (quickfix) |
require('telescope.builtin') |
Declaration | grD |
gD |
.declaration |
vim.lsp.buf |