Language tools

Editor

Language tools

Use completion, diagnostics, navigation, formatting, and language packs for the files in your workspace.

Use a language server

Red starts a configured server after you open a matching file. The built-in defaults cover Rust, Fish, Markdown, JavaScript and TypeScript, JSON, TOML, YAML, and Lua; those server executables must be installed separately and available on PATH. Red includes its own server for .hk and .husk files.

KShow hover documentation
gdGo to definition
Ctrl-SpaceRequest completion
Ctrl-kShow signature help
Ctrl-tFind document symbols
Space wFind workspace symbols
Space kFind references
Space .Show code actions
Space rRename a symbol
Space fFormat the current document

Completion and formatting

Completion combines words from open buffers with candidates from the active language server. Use the arrow keys or Ctrl-n/Ctrl-p to choose an item, Tab or Enter to accept it, and Ctrl-e to close the menu.

Red formats supported documents when saving and reindents pasted code by default. Disable either behavior without disabling explicit formatting:

[formatting]
on_save = false
on_paste = false

Add or override a server

[lsp.servers.go]
command = "gopls"
language_id = "go"
file_extensions = ["go"]
root_markers = ["go.mod", ".git"]

Restart Red after changing a server definition, or run :languages reload after changing a unified language definition.

Install a language pack

Open Language packs from the command palette, or use the CLI:

red plugin catalog
red plugin install --catalog go-language
red plugin install --catalog python-language --trust-native-grammars

Native Tree-sitter grammars execute inside the editor. Installing a pack doesn't approve them automatically; trust only the exact verified grammar bytes you intend to load.

red language trust LANGUAGE_ID
red language untrust LANGUAGE_ID