LSP Integration
Built-in Language Server Protocol support gives the Kimchi agent type-aware code intelligence — diagnostics, hover, go-to-definition, references, and rename.
Kimchi ships with built-in Language Server Protocol (LSP) support, giving the agent type-aware code intelligence. The LSP extension loads by default — no configuration required.
Supported languages
| Language | Server | Install |
|---|---|---|
| TypeScript / JavaScript | typescript-language-server | npm i -g typescript-language-server typescript |
| Go | gopls | go install golang.org/x/tools/gopls@latest |
Servers are auto-detected via which on PATH. If a server binary is not found, the corresponding tools are silently unavailable.
Tools
The LSP extension registers five tools that the agent can use during a session:
| Tool | Description |
|---|---|
lsp_diagnostics | Get type errors, warnings, and linter diagnostics for a file |
lsp_hover | Get type information and documentation for a symbol at a position |
lsp_definition | Navigate to the definition of a symbol (supports typeDefinition and implementation variants) |
lsp_references | Find all references to a symbol across the codebase |
lsp_rename | Atomically rename a symbol across all files |
The agent is prompted to prefer LSP tools over text-based alternatives — for example, lsp_definition over grep for navigating to definitions, and lsp_diagnostics over running the compiler manually to check for type errors.
Automatic diagnostics after edits
When the agent edits or writes a file, the LSP extension automatically:
- Syncs the change with the language server.
- Waits for diagnostics (type errors, warnings) to arrive.
- Injects any diagnostics back into the agent's context as a steer message.
This means the agent catches type errors immediately after making changes and can fix them in the same turn — without needing to manually run lsp_diagnostics or the compiler.
File reads are also synced with the language server so it has an accurate view of open files.
Status bar
When LSP servers are active, the status bar shows the server name(s) and the current diagnostic error count:
LSP: typescript-language-server (3 diags)
If multiple servers are running, their names are joined with commas:
LSP: typescript-language-server, gopls
The diagnostic count updates automatically after each file edit.
Prerequisites
The LSP extension requires the language server binaries to be installed and available on your PATH. Install them with the commands listed in the Supported languages table above.
To verify a server is available:
which typescript-language-server
which goplsIf neither server is found, the LSP tools are not registered and the extension has no effect.
See also
Updated 2 days ago
