Kotlin-Lsp: Kotlin Language Server and Plugin for Visual Studio Code

May 22, 2025 - 04:45
 0  0
Kotlin-Lsp: Kotlin Language Server and Plugin for Visual Studio Code

Language Server for Kotlin

Pre-alpha official Kotlin support for Visual Studio Code and an implementation of Language Server Protocol for the Kotlin language.

The server is based on IntelliJ IDEA and the IntelliJ IDEA Kotlin Plugin implementation.

Quick Start

  1. Download the latest build of VSC extension via RELEASES.md
  2. Install it as a VSC Extension via Extensions | More Action | Install from VSIX
    • Alternatively, it is possible to drag-and-drop VSIX extension directly into Extensions tool window
  3. Ensure that your Java version is 17 or above
  4. Open a folder with JVM-only Kotlin Gradle project and the project will be immediately recognized and LSP activated

Supported features and Roadmap

The best way to track current capabilities and what is going to be supported in the next builds is this table:

Important note: currently, only JVM-only Kotlin Gradle projects are supported out-of-the box.

    • replace with)
    • source.jar

Project Status

The project is in an experimental, pre-alpha, exploratory phase with the intention to be productionized.

We move fast, break things, and explore various aspects of the seamless developer experience including Java interoperability, limits of IntelliJ capabilities as a standalone server, native binaries of the LSP, and debug capabilities.

The LSP supports most of the essential parts, but its final shape is not near to be defined and even the most basic and core parts are being changed on a regular basis.

So we have the corresponding stability guarantees -- none. It is okay to use it in your toy projects, to experiment with it and to provide your feedback, but it is not recommended to depend on its stability in your day-to-day work.

Supported platforms

In the current state, the golden path has been tested for Visual Studio Code with macOS and Linux platforms.

You can use Kotlin LSP with other LSP-compliant editors, but configuration must be done manually. Please note that Kotlin LSP uses pull-based diagnostics, so the editor must support that.

You can find a standalone LSP launch script in kotlin-lsp.sh along with very experimental (aka "works on someone's machine") instructions that setup LSP for other editors in scripts folder. See ./kotlin-lsp.sh --help for available options.

Source code

Currently, the LSP implementation is partially closed-source, primarily for the sake of development speed convenience -- it heavily depends on parts of IntelliJ, Fleet, and our distributed Bazel build that allows us to iterate quickly and experiment much faster, cutting corners and re-using internal infrastructure where it helps. After the initial stabilization phase and defining the final set of capabilities, we will de-couple the LSP implementation from the internal repository and build pipelines and open source it completely (with an explicit dependency on IntelliJ), this is a temporary constraint. VSC extension is mirrored into kotlin-vscode as it does not depend on anything internal.

Feedback and issues

The best way to provide your feedback or report an issue is to file a bug in GitHub issues.

As a temporary limitation, direct contributions are not supported as this repository is a read-only mirror, but it is possible to open a PR into the documentation, and it will be integrated manually by maintainers.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0