Lampson

Extend

Language servers

With a language server, the agent navigates code the way your editor does: the outline of a file without reading it, where a symbol is defined, who uses it, what its type is. It makes fewer wrong guesses and reads far less.

Turning one on§

❯ /lsp add typescript

Presets: typescript, python (pyright), rust (rust-analyzer), go (gopls), css, html. In the web UI: LSP in the left panel → + nuevo. Or ask the agent — adding one always asks you first.

Lampson installs nothing: the preset runs the server the way you would (npx typescript-language-server --stdio, pyright-langserver…), so the tool has to be available on your machine — the TypeScript one needs typescript in the project's node_modules, which any TS project has. A server starts on its first query, not before.

Your own server§

~/lampson/.lampson/lsp.json (global) or <project>/.lampson/lsp.json:

{"servers": {"typescript": {"command": "npx", "args": ["--yes", "typescript-language-server", "--stdio"],
                            "languages": {".ts": "typescript", ".tsx": "typescriptreact"}}}}

What the agent gets§

One tool, lsp, with five read-only operations: symbols (the outline of a file), definition, references, implementation, hover. Read-only, so it is allowed in every mode and profile.

View as Markdown