LSP Servers
Language server integration for Kodine.
Kodine hooks into Language Server Protocol (LSP) servers so the agent can react to live diagnostics.
Built-in
A range of LSP servers for widely used languages ships with Kodine:
| LSP Server | Extensions | Requirements |
|---|---|---|
| astro | .astro | Downloads itself for Astro projects |
| bash | .sh, .bash, .zsh, .ksh | Downloads bash-language-server on its own |
| clangd | .c, .cpp, .cc, .cxx, .c++, .h, .hpp, .hh, .hxx, .h++ | Downloads itself for C/C++ projects |
| csharp | .cs, .csx | .NET SDK installed |
| clojure-lsp | .clj, .cljs, .cljc, .edn | clojure-lsp command on PATH |
| dart | .dart | dart command on PATH |
| deno | .ts, .tsx, .js, .jsx, .mjs | deno command on PATH (detects deno.json/deno.jsonc itself) |
| elixir-ls | .ex, .exs | elixir command on PATH |
| eslint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue | eslint present as a project dependency |
| fsharp | .fs, .fsi, .fsx, .fsscript | .NET SDK installed |
| gleam | .gleam | gleam command on PATH |
| gopls | .go | go command on PATH |
| hls | .hs, .lhs | haskell-language-server-wrapper command on PATH |
| jdtls | .java | Java SDK (version 21+) installed |
| julials | .jl | julia and LanguageServer.jl installed |
| kotlin-ls | .kt, .kts | Downloads itself for Kotlin projects |
| lua-ls | .lua | Downloads itself for Lua projects |
| nixd | .nix | nixd command on PATH |
| ocaml-lsp | .ml, .mli | ocamllsp command on PATH |
| oxlint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue, .astro, .svelte | oxlint present as a project dependency |
| php intelephense | .php | Downloads itself for PHP projects |
| prisma | .prisma | prisma command on PATH |
| pyright | .py, .pyi | pyright dependency installed |
| razor | .razor, .cshtml | .NET SDK plus the VS Code C# extension installed |
| ruby-lsp (rubocop) | .rb, .rake, .gemspec, .ru | ruby and gem commands on PATH |
| rust | .rs | rust-analyzer command on PATH |
| sourcekit-lsp | .swift, .objc, .objcpp | swift installed (xcode on macOS) |
| svelte | .svelte | Downloads itself for Svelte projects |
| terraform | .tf, .tfvars | Downloads from GitHub releases |
| tinymist | .typ, .typc | Downloads from GitHub releases |
| typescript | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | typescript present as a project dependency |
| vue | .vue | Downloads itself for Vue projects |
| yaml-ls | .yaml, .yml | Downloads the Red Hat yaml-language-server |
| zls | .zig, .zon | zig command on PATH |
Out of the box LSP stays off. Once switched on, a server launches whenever a matching extension from the table is opened and its prerequisites are satisfied.
How It Works
With LSP on, opening a file in Kodine triggers the following:
- The file’s extension is matched against every enabled LSP server.
- The matching server is launched unless it’s already running.
Best Practices
Feeding language-server diagnostics to the agent can surface and resolve problems faster. That pays off in some codebases, but it isn’t a universal win.
Language servers sometimes drift out of sync, consume significant memory, behave differently across versions or projects, and can drag on the agent’s pace. Frequently the better route is letting the agent invoke lint, typecheck, or similar diagnostic CLI tools directly — the errors still feed back into the agent loop, without those tradeoffs. Write those commands down in instruction files such as AGENTS.md or in skills so the agent knows they exist. Switch LSP on where the extra language-server feedback genuinely helps your project.
Configure
The lsp section of the Kodine config is where servers get enabled and tuned.
Setting lsp to true turns on every built-in server.
{ "$schema": "https://kodine.net/config.json", "lsp": true}Pass an object instead when you want the built-ins plus your own overrides or extra servers.
{ "$schema": "https://kodine.net/config.json", "lsp": {}}Every configured server entry accepts these fields:
command is mandatory for any entry that isn’t purely disabling a server.
| Property | Type | Description |
|---|---|---|
disabled | boolean | Switch to true to turn the server off |
command | string[] | How the server process is launched |
extensions | string[] | Which file extensions the server covers |
env | object | Environment variables applied at server startup |
initialization | object | Options forwarded in the LSP initialize request |
A few examples follow.
Environment variables
env injects environment variables into the server process at launch:
{ "$schema": "https://kodine.net/config.json", "lsp": { "rust": { "command": ["rust-analyzer"], "env": { "RUST_LOG": "debug" } } }}Initialization options
initialization forwards server-specific options inside the LSP initialize request:
{ "$schema": "https://kodine.net/config.json", "lsp": { "custom-lsp": { "command": ["custom-lsp-server", "--stdio"], "extensions": [".custom"], "initialization": { "preferences": { "importModuleSpecifierPreference": "relative" } } } }}Disabling LSP servers
Leaving lsp out entirely keeps every server off. If another config file switched them on, set lsp to false to turn them all back off:
{ "$schema": "https://kodine.net/config.json", "lsp": false}For a specific server, flip its disabled flag to true:
{ "$schema": "https://kodine.net/config.json", "lsp": { "typescript": { "disabled": true } }}Custom LSP servers
Register your own servers by giving a command plus the extensions it handles:
{ "$schema": "https://kodine.net/config.json", "lsp": { "custom-lsp": { "command": ["custom-lsp-server", "--stdio"], "extensions": [".custom"] } }}Additional Information
PHP Intelephense
Intelephense’s premium functionality unlocks with a license key. Drop the key — and nothing else — into a text file at:
- On macOS/Linux:
$HOME/intelephense/license.txt - On Windows:
%USERPROFILE%/intelephense/license.txt
No extra whitespace or content — the key alone.