Skip to main content

Module config

Module config 

Source
Expand description

Per-language-server configuration.

The editor maintains a registry of ServerConfig entries keyed by language identifier. When a buffer of that language is opened, the supervisor checks for an existing actor at the resolved workspace root; if absent, it constructs one from the config.

v1 ships hardcoded defaults for rust-analyzer, pyright, gopls, tsserver, clangd, and lua-language-server; users override via a future lsp.toml (queued behind §5.12). For now, builtin_servers returns the curated list and the editor reads from it directly.

Structs§

ServerConfig
Configuration for one language server. Captured at registry time; immutable after spawn.

Functions§

builtin_servers
Curated registry of well-known language servers. The editor loads these as defaults; user overrides (from lsp.toml in a future iteration) merge on top.
resolve_workspace_root
Walk up from start_dir looking for any of markers. Returns the resolved workspace root, applying language-specific “outermost wins” semantics where appropriate. Falls back to start_dir when no marker matches – the LSP spec allows passing the buffer’s directory as a degenerate workspace.