3.9 KiB
3.9 KiB
| Set | Mapping | Function | Neovim Function | Brief Description |
|---|---|---|---|---|
| y | gd |
Go to Definition | vim.lsp.buf.definition() |
Jump to the symbol's definition. |
| y | gD |
Go to Declaration | vim.lsp.buf.declaration() |
Jump to the symbol's declaration. |
| y | K |
Hover Documentation | vim.lsp.buf.hover() |
Show documentation and type information for the symbol under the cursor. |
| y | <leader>k |
Signature Help | vim.lsp.buf.signature_help() |
Display the current function signature and parameter information. |
| y | grr |
Find References | vim.lsp.buf.references() |
List all references to the symbol across the project. |
| y | gri |
Go to Implementation | vim.lsp.buf.implementation() |
Jump to the implementation(s) of the symbol. |
| y | grt |
Go to Type Definition | vim.lsp.buf.type_definition() |
Jump to the definition of the symbol's type. |
| y | grn |
Rename Symbol | vim.lsp.buf.rename() |
Rename the symbol and update all references. |
| y | gra |
Code Actions | vim.lsp.buf.code_action() |
Show available quick fixes and refactoring actions. |
| ? | gO |
Document Symbols | vim.lsp.buf.document_symbol() |
List all symbols (functions, classes, variables, etc.) in the current file. |
| y | [d |
Previous Diagnostic | vim.diagnostic.goto_prev() |
Jump to the previous diagnostic (error, warning, hint, or info). |
| y | ]d |
Next Diagnostic | vim.diagnostic.goto_next() |
Jump to the next diagnostic. |
| y | <leader>e |
Diagnostic Float | vim.diagnostic.open_float() |
Show diagnostic details in a floating window. |
| y | <leader>gl |
Diagnostics to Location List | vim.diagnostic.setloclist() |
Populate the location list with diagnostics from the current buffer. |
| y | <leader>f |
Format Buffer | vim.lsp.buf.format() |
Format the current buffer using the LSP server. |
| n | <leader>wa |
Add Workspace Folder | vim.lsp.buf.add_workspace_folder() |
Add a folder to the current LSP workspace. |
| n | <leader>wr |
Remove Workspace Folder | vim.lsp.buf.remove_workspace_folder() |
Remove a folder from the current LSP workspace. |
| n | <leader>wl |
List Workspace Folders | vim.lsp.buf.list_workspace_folders() |
List all folders in the current LSP workspace. |
| n | <leader>cl |
Run CodeLens | vim.lsp.codelens.run() |
Execute the CodeLens action at the current cursor position. |
| n | <leader>cr |
Refresh CodeLens | vim.lsp.codelens.refresh() |
Refresh available CodeLens actions in the buffer. |
| n | <leader>th |
Toggle Inlay Hints | vim.lsp.inlay_hint.enable() |
Enable or disable inline type and parameter hints. |