Open everson opened 6 years ago
Hello. Thank you for offering to contribute.
Here are some thoughts on adding language support:
setPlugins
call in build.gradle.kts
and in plugin.xml
. The case of the plugin name matters on platforms like Linux, so ensure it is properly capitalized. Here is the plugin declaration for the Scala support plugin, so add the appropriate depends
entry to plugin.xml
.Search Everywhere
to search for a class in the Java/Kotlin plugin sources that sounds like it might have the needed feature.DocumentCommand
or ProjectCommand
to implement the feature for LSP.projects
for an example of what to add. Again, we might want to organize tests by language and create java
, kotlin
and scala
directories.So, to summarize:
Find Definition
.DocumentCommand
or ProjectCommand
for Scala support.Command
subclass.Run
configuration from a host copy of IDEA and the LSP client. Import a Scala project to test into the debug IDEA instance, then use the LSP client to visit a Scala file tracked by that project. The client may need to be modified to start the LSP connection if a Scala file is visited (like Emacs). If the connection succeeds the debug IDEA instance should become hidden.idea.log
and standard error in your host copy of IDEA for any errors while testing.Hopefully this should be a good amount of info. If you have any questions, please let me know.
This is indeed a very good amount of info. I will report on progress after I have started. Thank you very much!
So,
The good news is that preliminary support for scala already exists. Just having the scala plugin installed/setup on the project and running the command lsp-intellij-enable
, many features work out of the box. This is great. I am still trying to understand the benefit of having language specific branches. I would expect that intellij would take care of that.
On other news, would you be able to tell me why I getting this green background on the whole class?
If you have not seen this, it Ok, it might be a misconfiguration on my end and I was wondering if you knew before I spend more time trying to figure it out.
The green background indicates the thing at point is runnable with lsp-run-at-point
. I guess I should add something in the README for that so it isn't confusing.
Thanks for the clarification. Would you be able to point me to where in the code that is happening? I would like to be able to turn it off. I searched for it and didn't find.
Hi, I would like to add Scala support for this plugin as a pull request. I would appreciate if you could give some notes of what needs to be done in order to achieve that.