LSP keymaps provide code intelligence features like navigation, hover documentation, and refactoring. These keymaps are buffer-local and set automatically when an LSP attaches to a buffer.
Most navigation keymaps use Snacks pickers for better UX with filtering and preview support. The native LSP functions are still available as fallbacks.
Navigation
Jump to definitions, declarations, and implementations.
| Key | Mode | Description |
|---|
gd | normal | Go to definition (Snacks picker) |
gD | normal | Go to declaration (Snacks picker) |
gi | normal | Go to implementation (Snacks picker) |
gt | normal | Go to type definition (Snacks picker) |
grp | normal | Go to references (Snacks picker) |
Navigation keymaps are defined in lua/plugins/snacks.lua:284 and use Snacks pickers for improved UX. They auto-confirm when only one result is found and filter duplicate results on the same line.
Access hover documentation and signature help.
| Key | Mode | Description |
|---|
K | normal | Hover documentation (rounded border) |
<C-k> | normal, insert | Signature help (rounded border) |
The hover window is configured with a maximum height of 25 lines and width of 120 characters for better readability. See lua/plugins/lsp/init.lua:82.
Code actions and refactoring
Trigger code actions and rename symbols.
| Key | Mode | Description |
|---|
ga | normal, visual | Code action (native LSP) |
<leader>ca | normal, visual | Code action (tiny-code-action) |
<leader>rn | normal | Rename symbol |
<leader>cl | normal | Run codelens actions |
Both ga and <leader>ca trigger code actions. The <leader>ca variant uses the tiny-code-action plugin for a minimal UI, while ga uses the native LSP handler.
Diagnostics
Navigate and view LSP diagnostics.
| Key | Mode | Description |
|---|
[d | normal | Previous diagnostic |
]d | normal | Next diagnostic |
<leader>cd | normal | Show diagnostic in float |
<leader>de | normal | Show diagnostic error messages |
<leader>dy | normal | Yank diagnostic message |
<leader>q | normal | Open diagnostic quickfix list |
Diagnostic signs are configured with custom icons and highlight groups. Virtual text is disabled in favor of the tiny-diagnostic plugin. See lua/plugins/lsp/init.lua:163.
Workspace management
Manage LSP workspace folders.
| Key | Mode | Description |
|---|
<leader>wa | normal | Add workspace folder |
<leader>wr | normal | Remove workspace folder |
<leader>wl | normal | List workspace folders |
Call hierarchy
Explore function call relationships.
| Key | Mode | Description |
|---|
<leader>ci | normal | Show incoming calls |
<leader>co | normal | Show outgoing calls |
Incoming calls show where a function is called from (call stack), while outgoing calls show what functions it calls.
Inlay hints
Toggle inlay hints for parameter names and type annotations.
| Key | Mode | Description |
|---|
<leader>ih | normal | Toggle inlay hints |
Inlay hints are disabled by default and must be manually enabled per buffer. Only servers with inlayHintProvider capability support this feature.
LSP symbols
Browse symbols in the current file or workspace.
| Key | Mode | Description |
|---|
<leader>sf | normal | LSP symbols (current buffer) |
<leader>sS | normal | LSP workspace symbols |
Configuration details
LSP keymaps are configured in lua/plugins/lsp/init.lua:65 within the setup_keymaps() function. They are applied via the LspAttach autocmd at line 137.
Capabilities
Enabled servers
LSP capabilities are configured with blink.cmp integration and folding support for nvim-ufo:local capabilities = require("blink.cmp").get_lsp_capabilities({
textDocument = {
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
},
},
})
See lua/plugins/lsp/init.lua:21. The following language servers are enabled by default:
lua_ls - Lua
gopls - Go
tsgo - TypeScript/JavaScript
angularls - Angular
biome - JS/TS/JSON linting
bashls - Bash/Shell
cssls - CSS/SCSS/Less
html - HTML
jsonls - JSON
yamlls - YAML
dockerls - Docker
clangd - C/C++
tailwindcss - Tailwind CSS
emmet_language_server - Emmet
harper_ls - Grammar/spell checking
See lua/plugins/lsp/init.lua:42.
Diagnostic configuration
Diagnostics use custom signs with severity-based highlighting:
| Severity | Icon | Highlight |
|---|
| Error | | ErrorMsg |
| Warning | | WarningMsg |
| Info | | (default) |
| Hint | | (default) |
Virtual text is disabled (virtual_text = false) because the tiny-diagnostic plugin provides a better inline diagnostic display.