docs menu: language servers
docsreference
language servers
Install the servers behind hover, definitions, references and outlines, and point easl at one.
on this page
Code tiles get hover, Go to Definition, Find References and Outline from a language server. easl runs its own:
- One per language and project.
- Started when first needed.
- Stopped after 5 idle minutes.
- At most 4 at once.
Without one, easl uses text search:
- Go to Definition: the lines declaring the name.
- Find References: word matches.
- Outline: declarations from the syntax tree.
The panel says so, and where it looked for a server.
install
| Language | Server | Install |
|---|---|---|
| Swift | sourcekit-lsp | Xcode or the Command Line Tools |
| Python | pyright | npm install -g pyright |
| TypeScript, JavaScript | typescript-language-server | npm install -g typescript-language-server typescript@5 |
| Go | gopls | go install golang.org/x/tools/gopls@latest |
| Rust | rust-analyzer | rustup component add rust-analyzer |
Use typescript@5: TypeScript 7 has no tsserver.
how easl finds a server
easl checks, in order:
EASL_LSP_<LANGUAGE>, if set:EASL_LSP_SWIFT,EASL_LSP_PYTHON,EASL_LSP_TYPESCRIPT,EASL_LSP_GO,EASL_LSP_RUST.- Your login shell’s PATH. Dock-launched apps get a minimal one.
- nvim’s mason (
~/.local/share/nvim/mason/bin), and~/go/binfor gopls. rustup which rust-analyzer, for rust-analyzer.
For a server elsewhere (Zed’s, a custom build), set the variable, say in ~/.zprofile:
export EASL_LSP_RUST=/path/to/rust-analyzer
After a miss, easl retries in 30 seconds, so a new server needs no restart.
projects
A server’s root is the nearest project marker above the file (Package.swift, pyproject.toml, tsconfig.json or package.json, go.mod, Cargo.toml, …), never above the board’s folder.
Swift: sourcekit-lsp runs with background indexing off, so opening a code tile never starts a swift build. Definitions and references come from the index your builds write. An empty answer says so.