---
updatedAt: 2026-10-23T13:39:44.000Z
agentTools:
  projectIndex: https://docs.kimchi.dev/llms.txt
---

# 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:

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](#supported-languages) table above.

To verify a server is available:

```bash
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

<Cards>
  <Card title="DAP Debugger" icon="fa-bug" href="https://docs.kimchi.dev/docs/coding-dap">
    Built-in Debug Adapter Protocol support — runtime debugging with breakpoints, stepping, and variable inspection.
  </Card>
  <Card title="Getting started" icon="fa-rocket" href="https://docs.kimchi.dev/docs/coding-getting-started">
    Install Kimchi and run your first coding session.
  </Card>
  <Card title="Connect MCP Servers" icon="fa-plug" href="https://docs.kimchi.dev/docs/coding-mcp-servers">
    Extend the agent with external tools via the Model Context Protocol.
  </Card>
  <Card title="Connect Your IDE" icon="fa-code" href="https://docs.kimchi.dev/docs/coding-ide-adapter">
    Share your editor's context — open files, selections, and diagnostics — with Kimchi.
  </Card>
</Cards>

# Sub pages

* [DAP Debugger](https://docs.kimchi.dev/docs/coding-dap.md)