Kotlin Language Server Does not recognize gradle dependencies

256 views Asked by At

I have recently switched to using AstroNeoVim. I have installed the kotlin_language_server LSP, Treesitter on my nvim and I saw changes after that. Now only issue i have is that LSP seems not to recognize classes that come from dependencies. I have no problem building and running my application with gradle build/run in terminal but nvim is still complaining.

LSP errors displayed

I tried: installing different LSPs, but only kotlin_language_server seemed to work this far. I checked that i have JAVA_HOME, I ran app with gradle without any issues in terminal

1

There are 1 answers

0
Vojin Purić On

Deleting gradle files from the project like mentioned here fixed the issue.

gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.properties
gradlew
gradlew.bat

Still not completely sure why this creates an issue, I will post if I know more, also there is this thread I created on reddit with some more useful info for configuring nvim for kotlin