Closed PezCoder closed 1 year ago
I tried removing the ~/.config/coc
directory & installed coc-kotlin again & got the following error with :CocInstall coc-kotlin
[coc.nvim] Error: Launching server "kotlin" using command /Users/rgupta2/.config/coc/extensions/coc-kotlin-data/langServerInstall/server/bin/kotlin-la
[coc.nvim]: UnhandledRejection: Launching server "kotlin" using command /Users/rgupta2/.config/coc/extensions/coc-kotlin-data/langServerInstall/server
/bin/kotlin-language-server failed.
Error: Launching server "kotlin" using command /Users/rgupta2/.config/coc/extensions/coc-kotlin-data/langServerInstall/server/bin/kotlin-language-serv
er failed.
at /Users/rgupta2/.vim/plugged/coc.nvim/build/index.js:244:6399
at async Md.createConnection (/Users/rgupta2/.vim/plugged/coc.nvim/build/index.js:240:15149)
at async Md._start (/Users/rgupta2/.vim/plugged/coc.nvim/build/index.js:240:7683)
I tried running this command directly:
/Users/rgupta2/.config/coc/extensions/coc-kotlin-data/langServerInstall/server/bin/kotlin-language-server
& this seem to be working without errors..
On opening a kotlin file now, it worked 🎉
For future folks who might be facing this:
Remove coc config data:
rm -rf ~/.config/coc
Reinstall coc & coc-kotlin
@PezCoder Oh my god, bless you so much. For future readers, during the reinstallation, when downloading the kotlin language server again, it might fail again, just ignore, let it finish its thing, restart gracefully and give it some time.
At the restart I didn't get the error anymore and after several seconds I finally have Kotlin support. Awesome.
Result from CocInfo
Description
coc-kotlin fails to start & I don't see any auto completions even after waiting for 10-15 mins.
Extension version
Additional context
Here is what
:CocCommand workspace.showOutput
saysTry using kotlin-language-server directly works I tried removing coc-kotlin & since it uses kotlin-language-server it works for me!
I cloned & built kotlin-language-server from it repository & added the following in my
:CocConfig
The same worked, but I had to wait for 3-5 mins before it starts & have to keep an eye on my
workspace.showOutput
to know when it's ready to use, so not very convenient. I think coc-kotlin uses this language server under the hood & provide helpful info like the state of plugin & building it etc.Would you be able to help me debug what the issue might be?