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

LanguageServerInstall
TypeScript / JavaScripttypescript-language-servernpm i -g typescript-language-server typescript
Gogoplsgo 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:

ToolDescription
lsp_diagnosticsGet type errors, warnings, and linter diagnostics for a file
lsp_hoverGet type information and documentation for a symbol at a position
lsp_definitionNavigate to the definition of a symbol (supports typeDefinition and implementation variants)
lsp_referencesFind all references to a symbol across the codebase
lsp_renameAtomically 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:

  1. Syncs the change with the language server.
  2. Waits for diagnostics (type errors, warnings) to arrive.
  3. 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 gopls

If neither server is found, the LSP tools are not registered and the extension has no effect.

See also


Did this page help you?