An unofficial flake for an official Kotlin LSP server

docs: added README

bpavuk.neocities.org 310fecce dfe16a4d

verified
Changed files
+42
+42
README.md
··· 1 + # The `kotlin-lsp` Flake 2 + 3 + This unofficial flake will help you enable [official Kotlin LSP](https://github.com/Kotlin/kotlin-lsp) in your devshell or NixOS configuration. 4 + 5 + To start, add `kotlin-lsp` to your flake input: 6 + 7 + ```nix 8 + { 9 + inputs.kotlin-lsp = { 10 + inputs.nixpkgs.follows = "nixpkgs"; 11 + url = "git+https://tangled.org/bpavuk.neocities.org/kotlin-lsp-flake"; 12 + }; 13 + ... 14 + } 15 + ``` 16 + 17 + Then, add an overlay and `kotlin-lsp` dependency: 18 + 19 + ```nix 20 + { 21 + # inputs ... 22 + # devshell boilerplate and existing code ... 23 + let 24 + pkgs = import nixpkgs { 25 + overlays = [ kotlin-lsp.overlays.default ] 26 + }; 27 + in 28 + { 29 + packages = [ 30 + # Gradle, JDK, Kotlin compiler itself, maybe other stuff ... 31 + 32 + pkgs.kotlin-lsp 33 + ]; 34 + }; 35 + } 36 + ``` 37 + 38 + Now, try running `kotlin-lsp --help` in your command line to check if it all works. 39 + 40 + On attaching Kotlin LSP to other editors (Neovim, Zed, VS Code, etc.), take a look at [Kotlin LSP README](https://github.com/Kotlin/kotlin-lsp). 41 + 42 + Have fun!