From 6b332d2eb3ace175325ff355d8bd929b3e3b9914 Mon Sep 17 00:00:00 2001 From: Hayden Young <22327045+hbjydev@users.noreply.github.com> Date: Sat, 7 Jun 2025 18:15:07 +0100 Subject: [PATCH 1/2] docs: nvim-lspconfig support --- scripts/neovim.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/neovim.md b/scripts/neovim.md index 7348960..158939c 100644 --- a/scripts/neovim.md +++ b/scripts/neovim.md @@ -1,5 +1,22 @@ # neovim setup +## `nvim-lspconfig` setup + +There is a preset configuration for using `kotlin-lsp` with Neovim in the +official [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) plugin. + +To use it, just enable it in your configuration. + +```lua +-- enable the language server +vim.lsp.enable('kotlin-lsp') + +-- configure its options +vim.lsp.config('kotlin-lsp', { + single_file_support = false, +}) +``` + ## stdio way 1. Ensure socat and netcat are installed From 93e5428523d565fa5738e07a0c7cf5f81f383d6f Mon Sep 17 00:00:00 2001 From: Hayden Young <22327045+hbjydev@users.noreply.github.com> Date: Sat, 7 Jun 2025 18:16:10 +0100 Subject: [PATCH 2/2] docs: add note that it needs to be in PATH --- scripts/neovim.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/neovim.md b/scripts/neovim.md index 158939c..74733e9 100644 --- a/scripts/neovim.md +++ b/scripts/neovim.md @@ -5,7 +5,8 @@ There is a preset configuration for using `kotlin-lsp` with Neovim in the official [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) plugin. -To use it, just enable it in your configuration. +To use it, just enable it in your configuration and ensure `kotlin-lsp` is +available in `PATH` (or override the `cmd` option to point at the right place). ```lua -- enable the language server