An unofficial flake for an official Kotlin LSP server
Nix 100.0%
3 1 0

Clone this repository

https://tangled.org/bpavuk.neocities.org/kotlin-lsp-flake
git@tangled.org:bpavuk.neocities.org/kotlin-lsp-flake

For self-hosted knots, clone URLs may differ based on your setup.

README.md

The kotlin-lsp Flake#

This unofficial flake will help you enable official Kotlin LSP in your devshell or NixOS configuration.

To start, add kotlin-lsp to your flake input:

{
  inputs.kotlin-lsp = {
    inputs.nixpkgs.follows = "nixpkgs";
    url = "git+https://tangled.org/bpavuk.neocities.org/kotlin-lsp-flake";
  };
...
}

Then, add an overlay and kotlin-lsp dependency:

{
  # inputs ...
  # devshell boilerplate and existing code ...
  let
    pkgs = import nixpkgs {
      overlays = [ kotlin-lsp.overlays.default ]
    };
  in
  {
    packages = [
      # Gradle, JDK, Kotlin compiler itself, maybe other stuff ...
      
      pkgs.kotlin-lsp
    ];
  };
}

Now, try running kotlin-lsp --help in your command line to check if it all works.

On attaching Kotlin LSP to other editors (Neovim, Zed, VS Code, etc.), take a look at Kotlin LSP README.

Have fun!