Skip to content
New Kodine v2 is now available

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 ServerExtensionsRequirements
astro.astroDownloads itself for Astro projects
bash.sh, .bash, .zsh, .kshDownloads 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, .ednclojure-lsp command on PATH
dart.dartdart command on PATH
deno.ts, .tsx, .js, .jsx, .mjsdeno command on PATH (detects deno.json/deno.jsonc itself)
elixir-ls.ex, .exselixir command on PATH
eslint.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vueeslint present as a project dependency
fsharp.fs, .fsi, .fsx, .fsscript.NET SDK installed
gleam.gleamgleam command on PATH
gopls.gogo command on PATH
hls.hs, .lhshaskell-language-server-wrapper command on PATH
jdtls.javaJava SDK (version 21+) installed
julials.jljulia and LanguageServer.jl installed
kotlin-ls.kt, .ktsDownloads itself for Kotlin projects
lua-ls.luaDownloads itself for Lua projects
nixd.nixnixd command on PATH
ocaml-lsp.ml, .mliocamllsp command on PATH
oxlint.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue, .astro, .svelteoxlint present as a project dependency
php intelephense.phpDownloads itself for PHP projects
prisma.prismaprisma command on PATH
pyright.py, .pyipyright dependency installed
razor.razor, .cshtml.NET SDK plus the VS Code C# extension installed
ruby-lsp (rubocop).rb, .rake, .gemspec, .ruruby and gem commands on PATH
rust.rsrust-analyzer command on PATH
sourcekit-lsp.swift, .objc, .objcppswift installed (xcode on macOS)
svelte.svelteDownloads itself for Svelte projects
terraform.tf, .tfvarsDownloads from GitHub releases
tinymist.typ, .typcDownloads from GitHub releases
typescript.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .ctstypescript present as a project dependency
vue.vueDownloads itself for Vue projects
yaml-ls.yaml, .ymlDownloads the Red Hat yaml-language-server
zls.zig, .zonzig 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:

  1. The file’s extension is matched against every enabled LSP server.
  2. 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.

kodine.json
{
"$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.

kodine.json
{
"$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.

PropertyTypeDescription
disabledbooleanSwitch to true to turn the server off
commandstring[]How the server process is launched
extensionsstring[]Which file extensions the server covers
envobjectEnvironment variables applied at server startup
initializationobjectOptions forwarded in the LSP initialize request

A few examples follow.


Environment variables

env injects environment variables into the server process at launch:

kodine.json
{
"$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:

kodine.json
{
"$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:

kodine.json
{
"$schema": "https://kodine.net/config.json",
"lsp": false
}

For a specific server, flip its disabled flag to true:

kodine.json
{
"$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:

kodine.json
{
"$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.