Skip to content

Commit ecdfc5f

Browse files
authored
Merge pull request #421 from RenFraser/neovim-lspconfig
Add neovim lsp config instructions
2 parents a2cf42f + 3c6661c commit ecdfc5f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

EDITORS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,25 @@ Add the following to your coc-settings.json file:
4242
Note that you may need to substitute `kotlin-language-server` with `kotlin-language-server.bat` on Windows.\
4343
You should also note, that you need a syntax highlighter like [udalov/kotlin-vim](https://github.com/udalov/kotlin-vim) or [sheerun/vim-polyglot](https://github.com/sheerun/vim-polyglot) to work well with coc.
4444

45+
## Neovim
46+
47+
Using Neovim's [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig), register
48+
the language server using the following.
49+
50+
```lua
51+
require'lspconfig'.kotlin_language_server.setup{}
52+
```
53+
54+
If desired, you can also pass in your own defined options to the setup function.
55+
56+
```lua
57+
require'lspconfig'.kotlin_language_server.setup{
58+
on_attach = on_attach,
59+
flags = lsp_flags,
60+
capabilities = capabilities,
61+
}
62+
```
63+
4564
## Other Editors
4665
Install a [Language Server Protocol client](https://microsoft.github.io/language-server-protocol/implementors/tools/) for your tool. Then invoke the language server executable in a client-specific way.
4766

0 commit comments

Comments
 (0)