Command Reference
Open the command palette with ctrl+shift+p and search for Lsp, or use Tools > Language Server. Most document commands require an active document opened by a running server. An enabled command can still have no result if the server lacks that capability.
Bindings below use the plugin's portable keymap names. On macOS, Pragtical
translates ctrl to Command and alt to Option.
Change bindings in Settings or your user module.
Completion and Documentation
| Command | Default shortcut | Action |
|---|---|---|
lsp:complete | ctrl+space | Request completion, with ordinary autocomplete fallback. |
lsp:show-signature | ctrl+shift+space | Show function signature help. |
lsp:show-symbol-info | alt+a | Show symbol documentation in a popup. |
lsp:show-symbol-info-in-tab | alt+shift+a | Open documentation in a help pane. |
LSP also wraps autocomplete:open, retaining its completion fallback.
Autocomplete uses tab to accept a suggestion. For LSP's own list
popups, listbox:select also uses tab, and
listbox:cancel uses escape.
Navigation
| Command | Default shortcut | Action |
|---|---|---|
lsp:goto-definition | alt+d | Navigate to a symbol definition. |
lsp:goto-implementation | alt+shift+d | Navigate to an implementation. |
lsp:goto-definition-under-cursor | alt+shift+left click | Definition at the pointer location. |
lsp:goto-implementation-under-cursor | ctrl+alt+shift+left click | Implementation at the pointer location. |
lsp:find-references | alt+f | Open the reference picker. |
lsp:view-document-symbols | alt+s | Open the current document's symbol picker. |
lsp:find-workspace-symbol | alt+shift+s | Submit a workspace symbol query. |
lsp:toggle-symbols-tree | alt+shift+backslash | Toggle the tree and disable auto-hide. |
lsp:enable-symbols-tree-auto-hide | None | Restore automatic tree visibility. |
lsp:view-call-hierarchy | alt+shift+c | Prepare a call-hierarchy request; no results browser yet. |
The workspace-symbol command is globally registered, but its request still needs a supported active source document.
Editing and Diagnostics
| Command | Default shortcut | Action |
|---|---|---|
lsp:code-action | alt+c | Request actions at the caret or selection. |
lsp:rename-symbol | alt+r | Rename the selected symbol through a preview. |
lsp:format-document | alt+shift+f | Request whole-document formatting. |
lsp:view-document-diagnostics | alt+e | List messages for the current document. |
lsp:view-all-diagnostics | ctrl+alt+e | List files with stored diagnostics. |
lsp:toggle-diagnostics | alt+shift+e | Toggle inline diagnostics through Lint+. |
Server Controls
These commands have no default shortcuts. They also appear in the Servers submenu.
| Command | Action |
|---|---|
lsp:start-servers | Start applicable servers for open files. |
lsp:stop-servers | Stop currently running servers. |
lsp:restart-servers | Stop servers and start the applicable definitions again. |
View-Specific Controls
In the Symbols Tree, up/down select items,
left/right toggle expansion, and enter
jumps to the selected symbol. The corresponding commands are
lsp-symbols-tree:select-previous, select-next, toggle-expand,
and open-selected, with that same prefix.
In Symbol Rename, the lsp-symbol-rename: commands provide
select-previous, select-next, toggle-expand,
toggle-checkbox, and open-selected. Their bindings are
up, down, left/right,
space, and enter.
Page Up/Down scroll the preview; Ctrl+Home/End jump to its start/end.
These controls are contextual: their view must hold focus. A normal document's arrow keys still move its caret.