https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

Levi

10/11/2023, 6:34 PM
Has anyone here been able to get Kotlin Language Server working with vim/nvim? I've installed it, but just doesn't seem to be working.... Go To Definition not working, etc.
v

Victor Ng

10/11/2023, 8:25 PM
i got it working today!
@Levi https://gist.github.com/crankycoder/bb82d7773155e0736efbbce1159b3071 I'm using this in neovim, but I will admit, it's not good enough yet that i can switch back from intellij. the gd jump does work though
i have a bunch of cruft in my vimrc that probably doesn't make much sense anymore - i'm trying to slim it down to a useful set for just kotlin
l

Levi

10/12/2023, 3:14 AM
thanks @Victor Ng!
v

Victor Ng

10/12/2023, 3:49 PM
i'd like to be able to get docstrings to render in the completion preview - i haven't dug into Coc-Kotlin to see if that's possible
l

Levi

10/12/2023, 3:50 PM
right
v

Victor Ng

10/12/2023, 3:50 PM
intellij's vim mode is kind of terrible.
l

Levi

10/12/2023, 3:50 PM
I've gotten a bit further but jump to definition still not 100%
v

Victor Ng

10/12/2023, 3:50 PM
😞
l

Levi

10/12/2023, 3:50 PM
Yeah I'm learning that 😩
I wanted to at least be able to have modal editing so when switching between vim and intellij it's not totally different
but yeah it ain't great
v

Victor Ng

10/12/2023, 3:51 PM
what does work for you with neovim + coc-kotlin?
l

Levi

10/12/2023, 3:53 PM
I'm actually not using coc-kotlin. I'm using mason + lsp-zero.nvim, etc
maybe I'd have better luck with coc
this has worked well for python, nim, etc.
v

Victor Ng

10/12/2023, 3:55 PM
ah...my vimrc is ancient. i only recently switched to neovim. 🙃
l

Levi

10/12/2023, 3:55 PM
Same actually
I spent a few hours poring over what he did here:

https://youtu.be/w7i4amO_zaE

v

Victor Ng

10/12/2023, 3:55 PM
Coc has worked super well for me. i've never used mason or lsp-ero
94 Views