Skip to main content

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​

CommandDefault shortcutAction
lsp:completectrl+spaceRequest completion, with ordinary autocomplete fallback.
lsp:show-signaturectrl+shift+spaceShow function signature help.
lsp:show-symbol-infoalt+aShow symbol documentation in a popup.
lsp:show-symbol-info-in-tabalt+shift+aOpen 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.

CommandDefault shortcutAction
lsp:goto-definitionalt+dNavigate to a symbol definition.
lsp:goto-implementationalt+shift+dNavigate to an implementation.
lsp:goto-definition-under-cursoralt+shift+left clickDefinition at the pointer location.
lsp:goto-implementation-under-cursorctrl+alt+shift+left clickImplementation at the pointer location.
lsp:find-referencesalt+fOpen the reference picker.
lsp:view-document-symbolsalt+sOpen the current document's symbol picker.
lsp:find-workspace-symbolalt+shift+sSubmit a workspace symbol query.
lsp:toggle-symbols-treealt+shift+backslashToggle the tree and disable auto-hide.
lsp:enable-symbols-tree-auto-hideNoneRestore automatic tree visibility.
lsp:view-call-hierarchyalt+shift+cPrepare 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​

CommandDefault shortcutAction
lsp:code-actionalt+cRequest actions at the caret or selection.
lsp:rename-symbolalt+rRename the selected symbol through a preview.
lsp:format-documentalt+shift+fRequest whole-document formatting.
lsp:view-document-diagnosticsalt+eList messages for the current document.
lsp:view-all-diagnosticsctrl+alt+eList files with stored diagnostics.
lsp:toggle-diagnosticsalt+shift+eToggle inline diagnostics through Lint+.

Server Controls​

These commands have no default shortcuts. They also appear in the Servers submenu.

CommandAction
lsp:start-serversStart applicable servers for open files.
lsp:stop-serversStop currently running servers.
lsp:restart-serversStop 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.