diff --git a/README.md b/README.md index 0d4a699..c8f00b6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ for the Kotlin language. The server is based on [IntelliJ IDEA](https://github.com/JetBrains/intellij-community) and the [IntelliJ IDEA Kotlin Plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin) implementation. -### Quick Start +### VS Code Quick Start 1. Download the latest build of VSC extension or Standalone version from the [Releases Page](https://github.com/Kotlin/kotlin-lsp/releases) 2. Install it as a VSC Extension via `Extensions | More Action | Install from VSIX` @@ -21,6 +21,16 @@ implementation. ![quickstart_sample.gif](images/quickstart_sample.gif) +### Install kotlin-lsp CLI + +For brew users: `brew install JetBrains/utils/kotlin-lsp` + +Manual installation: +1. Download the standalone zip from the [Releases Page](https://github.com/Kotlin/kotlin-lsp/releases) +2. Unpack zip +3. `chmod +x $KOTLIN_LSP_DIR/kotlin-lsp.sh` +4. Create a symlink inside your PATH `ln -s $KOTLIN_LSP_DIR/kotlin-lsp.sh $HOME/.local/bin/kotlin-lsp` + ### 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: diff --git a/scripts/neovim.md b/scripts/neovim.md index 2a92104..91e92b4 100644 --- a/scripts/neovim.md +++ b/scripts/neovim.md @@ -1,44 +1,5 @@ -# neovim setup +# Neovim setup -## stdio way - -1. Ensure socat and netcat are installed - -2. Ensure `kotlin-lsp.sh` is executable - - ```sh - chmod +x $KOTLIN_LSP_DIR/kotlin-lsp.sh - ``` - -3. Create a symlink inside your `PATH` to `kotlin-lsp.sh` script, e.g.: - - ```sh - ln -s $KOTLIN_LSP_DIR/kotlin-lsp.sh $HOME/.local/bin/kotlin-ls - ``` - -4. Configure [nvim.lsp](https://neovim.io/doc/user/lsp.html) e.g: - ```lua - { - cmd = { "kotlin-ls", "--stdio" }, - single_file_support = true, - filetypes = { "kotlin" }, - root_markers = { "build.gradle", "build.gradle.kts", "pom.xml" }, - } - ``` - -## tcp way - -Requires manual launch of language server - -1. launch language server with `kotlin-lsp.sh` script - -2. Configure [nvim.lsp](https://neovim.io/doc/user/lsp.html) e.g: - ```lua - { - cmd = vim.lsp.rpc.connect('127.0.0.1', tonumber(9999)), - single_file_support = true, - filetypes = { "kotlin" }, - root_markers = { "build.gradle", "build.gradle.kts", "pom.xml" }, - } - ``` - +1. [Install `kotlin-lsp` CLI](../README.md#install-kotlin-lsp-cli) +2. Install the official Neovim [`nvim-lspconfig` plugin](https://github.com/neovim/nvim-lspconfig) +3. Enable the LSP `vim.lsp.enable('kotlin_lsp')` in your `init.lua`