packages/shared-skills/skills/lsp-setup/references/kotlin/README.md
kotlin-ls — kotlin-lsp.kt .ktshttps://github.com/Kotlin/kotlin-lspThe official JetBrains Kotlin LSP is pre-release. Download a build from the Kotlin/kotlin-lsp releases and put the kotlin-lsp launcher on PATH.
ln -s /path/to/kotlin-lsp/kotlin-lsp.sh /usr/local/bin/kotlin-lspkotlin-lsp on PATH.kotlin-lsp.bat to PATH (invoke as kotlin-lsp).Requires a JDK on the machine to run the server.
Confirm it resolves:
command -v kotlin-lsp
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in .codex/lsp-client.json (Codex) AND .opencode/lsp.json (OpenCode/omo):
{ "lsp": { "kotlin-ls": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled/env. A fully custom (non-builtin) server with its own command must go in the USER config (~/.codex/lsp-client.json).
None commonly required. If kotlin-lsp cannot find a Java runtime, set JAVA_HOME:
{ "lsp": { "kotlin-ls": { "env": { "JAVA_HOME": "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home" } } } }
The server resolves classpath from Gradle/Maven; keep the build descriptor importable.
fwcd/kotlin-language-server — older community server (not builtin). Still usable but less actively maintained than the official JetBrains one.kotlin-lsp on PATH; reopen shell after install.JAVA_HOME..kts scripts: build/script files resolve more slowly than .kt sources; this is expected.bun ../../scripts/verify-lsp.ts path/to/File.kt