Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Language servers

Helix has built-in support for the Language Server Protocol, providing IDE-like features — diagnostics, completion, goto-definition, rename and more, for any language that has a server configured. Language servers are separate programs you install yourself: the language support page lists which languages ship with a server configured, and the language server configuration wiki has per-server installation notes.

Run hx --health <language> to check whether Helix found the configured server for a language. After changing a server’s configuration, :lsp-restart reloads it and :lsp-stop stops it; :lsp-workspace-command runs a command the server exposes for the workspace.

Features

Most features are bound by default (see the keymap); the relevant keys are listed below.

FeatureDefault key / command
Diagnostics — shown inline and in the gutternavigate with [d / ]d; Space-d / Space-D open the document / workspace pickers
Completionautomatic while typing; Ctrl-x triggers it manually
Hover documentationSpace-k
Signature help (parameter hints)automatic while typing arguments
Goto definition / declaration / type / references / implementationgd / gD / gy / gr / gi
Rename symbolSpace-r
Code actionsSpace-a
Document / workspace symbolsSpace-s / Space-S
Format document:format, or set auto-format to format on save
Inlay hintsenable with display-inlay-hints (see below)

Configuration

The [editor.lsp] section of config.toml toggles LSP behaviour — display-inlay-hints, auto-signature-help, auto-document-highlight, snippets, and enable to disable LSP entirely. How much diagnostic detail is shown inline at the cursor is configured separately in [editor.inline-diagnostics].

Which server(s) a language uses, the server’s command and arguments, and any language-specific settings are configured in languages.toml (see Language Server configuration). A language may use several servers: for each request the first server in the list that supports it is used, and a server’s features can be limited with only-features / except-features.