Keyboard Shortcuts

Below is a list of supported commands and the corresponding keyboard shortcut (if assigned). Most of those are also available from the Command Palette, the main menu and the mouse context menu.

Refer to the Customization section on how to modify or assign shortcuts to them.


If you using macOS, replace ctrl with command.


If F4 / shift F4 stop working, double-click a diagnostic in the Diagnostics Panel. It should work again afterwards.

Feature Shortcut Command
Auto Complete ctrl space (also on macOS) auto_complete
Expand Selection unbound lsp_expand_selection
Find References shift f12 lsp_symbol_references
Format File unbound lsp_format_document
Format Selection unbound lsp_format_document_range
Goto Declaration unbound lsp_symbol_declaration
Goto Definition unbound
suggested: f12
Goto Implementation unbound lsp_symbol_implementation
Goto Symbol unbound
suggested: ctrl r
Goto Symbol in Project unbound
suggested: ctrl shift r
Goto Type Definition unbound lsp_symbol_type_definition
Next Diagnostic F4 -
Previous Diagnostic shift F4 -
Rename unbound lsp_symbol_rename
Restart Server unbound lsp_restart_server
Run Code Action unbound lsp_code_actions
Run Source Action unbound lsp_code_actions (with args: {"only_kinds": ["source"]})
Run Code Lens unbound lsp_code_lens
Signature Help ctrl alt space lsp_signature_help_show
Hover Popup unbound lsp_hover
Toggle Diagnostics Panel ctrl alt m lsp_show_diagnostics_panel
Toggle Log Panel unbound lsp_toggle_server_panel