Skip to main content
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.
Jump to definitions, declarations, and implementations.
KeyModeDescription
gdnormalGo to definition (Snacks picker)
gDnormalGo to declaration (Snacks picker)
ginormalGo to implementation (Snacks picker)
gtnormalGo to type definition (Snacks picker)
grpnormalGo 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.

Information and documentation

Access hover documentation and signature help.
KeyModeDescription
KnormalHover documentation (rounded border)
<C-k>normal, insertSignature 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.
KeyModeDescription
ganormal, visualCode action (native LSP)
<leader>canormal, visualCode action (tiny-code-action)
<leader>rnnormalRename symbol
<leader>clnormalRun 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.
KeyModeDescription
[dnormalPrevious diagnostic
]dnormalNext diagnostic
<leader>cdnormalShow diagnostic in float
<leader>denormalShow diagnostic error messages
<leader>dynormalYank diagnostic message
<leader>qnormalOpen 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.
KeyModeDescription
<leader>wanormalAdd workspace folder
<leader>wrnormalRemove workspace folder
<leader>wlnormalList workspace folders

Call hierarchy

Explore function call relationships.
KeyModeDescription
<leader>cinormalShow incoming calls
<leader>conormalShow 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.
KeyModeDescription
<leader>ihnormalToggle 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.
KeyModeDescription
<leader>sfnormalLSP symbols (current buffer)
<leader>sSnormalLSP 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.
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.

Diagnostic configuration

Diagnostics use custom signs with severity-based highlighting:
SeverityIconHighlight
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.

Build docs developers (and LLMs) love