You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #3 and likely more such integrations would require communicating between the java.ls extension and the kotlin language server running separately, I tried an alternate approach to simplify the communication.
This essentially attempts to run the entire Kotlin ls as a java.ls plugin. The server is started via a custom command Kotlin ls would contribute to the Java ls. This certainly requires some more modifications, but would have a number of benefit for the java-kotlin multi-lingual projects.
We can modify the Kotlin LS to use the project definition, classpath etc from the Java LS. This way both Java and Kotlin part of the project sees the same project configuration. Lesser chances of mismatch and surprises between the two.
Kotlin build can be integrated with the Java build, such that we see even lesser errors, even at the initial stages of the project setup and build.
I was able to run the language server this way, see the commit above. Though this commit does not have the corresponding changes required in kotlin plugin to trigger the custom command to start the LS. Obviously this helps in the Java-Kotlin interop cases only. We'd still need the standalone Kotlin server for other cases.
I'm really not an expert at this and could not follow up post this. Thought I'd share in case this helps.
Also, the changes there might also help with #4 as I was able to use gradle only for the Java ls plugin.
Since #3 and likely more such integrations would require communicating between the java.ls extension and the kotlin language server running separately, I tried an alternate approach to simplify the communication.
Have a look at nisargjhaveri/kotlin-language-server@c8129aa, if interested.
This essentially attempts to run the entire Kotlin ls as a java.ls plugin. The server is started via a custom command Kotlin ls would contribute to the Java ls. This certainly requires some more modifications, but would have a number of benefit for the java-kotlin multi-lingual projects.
I was able to run the language server this way, see the commit above. Though this commit does not have the corresponding changes required in kotlin plugin to trigger the custom command to start the LS. Obviously this helps in the Java-Kotlin interop cases only. We'd still need the standalone Kotlin server for other cases.
I'm really not an expert at this and could not follow up post this. Thought I'd share in case this helps.
Also, the changes there might also help with #4 as I was able to use gradle only for the Java ls plugin.