Closed jsorel closed 7 months ago
LuaJava is a library that runs Lua code on Java, while LSP is for people writing Lua code, which is out of the scope of this library. (Consider LuaJava as something similar to JRE and LSP as JDK or an IDE implementation.)
I would recommend looking into LuaLS.
I understand it is a little out of the scope of LuaJava (you can see it as JRE JEP 457: Class-File API)
Embedding LuaLS will not be an easy task.
Anyway, thanks for the quiick reply.
Hello,
Running Lua inside Java is great, and thanks for the work you've done so far.
Lua is meant to be a scripting language to embed in applications, as such it would be interesting to offer some syntax coloration and code completion in the application itself.
To give you the context, I'm working on the IHO S-100 specification (https://iho.int/fr/s100-project), to make it short it's 1000pages describing how to make marine navigation maps and it has adopted LUA as it's default scripting language.
What I would like is to offer light IDE capabilities in a text editor inside the application. (swing,javafx,web/angular)
Rather then making a custom API for it, using the existing LSP protocol would benefit a much larger community. like for example integration in existing IDE like Netbeans, Eclipse, IntelliJ, VScode. The good thing is, when implementing the server side of LSP, all the above IDE will be usable to test it.
I'm no expert in Lua and neither with LSP, but from what I understood the LSP server may have very limited capabilities (just syntax highlight) and progressively add more stuff. Fortunately we do not have to do everything, the Eclipse LSP4J provides all the bindings for both client and server sides (https://github.com/eclipse-lsp4j/lsp4j)
I think it would be a nice new module in LuaJava. What do you think ?