r/Kotlin • u/bash-spbu • 6h ago
Yet another kotlin lsp written in Rust
TL;DR: A new, full-featured and lightweight Kotlin language server, written in Rust.
Site: https://bash-spbu.github.io/kotlin-analyzer/
GitHub: https://github.com/bash-spbu/kotlin-analyzer
Pros:
- Feature-rich: nearly all of LSP 3.18 that applies to Kotlin (hierarchies, inlay hints, semantic tokens, code lenses, organize imports…), plus its own debugger, decompiler, ktfmt-compatible formatter and an MCP server for AI agents.
- Fast and light: one native binary, no JVM of its own. Hover and go-to-definition answer in ~0.1 ms (p50), edits get fresh diagnostics in ~2 ms; ktor's 2,300 files load in 2.6 s and take ~200 MB. Library indexes are kept on disk.
- Built the rust-analyzer way: incremental, query-based (Salsa), with a typed syntax tree and per-module name resolution.
- Runs where you work: macOS, Linux and Windows; VS Code, Neovim, Helix, Zed and Claude Code extensions, plus any LSP client; Gradle and Maven; Kotlin/JVM, Android and Multiplatform.
- Open and AI-extensible: Apache-2.0, with a spec of every feature and agent docs, so your agent can add what your project needs.
Cons:
- Diagnostics report only what the analysis is sure of. You won't get every compiler error, as with JetBrains' kotlin-lsp.
- Daily use has mostly been Zed on macOS with large Gradle Spring Boot projects. Android and KMP are benchmarked on nowinandroid, ktor and kotlinconf-app. Windows and Maven support is new in 1.3.0 and not yet battle-tested; Kotlin/JS, Wasm and Native libraries aren't read yet.
If you try it and hit a bug or a missing feature, please open an issue with a public project and a file/line that shows it. We'd really appreciate it!
A note on AI: most of the code was written by an AI coding agent (Claude Code), directed and reviewed by us. Every feature is specified first in docs/spec/, every change comes with fixture tests that fail without it, and diagnostics are checked at zero false errors on eight large closed-source Spring Boot projects. That same setup is what makes it easy for your own agent to extend.