Has anyone done any work for a Language Server Protocol (https://langserver.org/) for Kawa? Any insights or partial code? I ask because I'm getting ready to jump into this as the next major project for Kawa. (I do have one non-trivial bug It want to resolve first: GitLab issue #33 and Savannah bug #52390, which are probably both related to the fix for issue #11). -- --Per Bothner per@bothner.com http://per.bothner.com/
Hello Per, i started doing this a few months ago, but I didn't get very far at all. Perhaps it's because of how I tried to do it - I looked at https://github.com/palantir/language-servers and https://github.com/eclipse/lsp4j and tried to implement the LanguageClientAware and LanguageServer interfaces. The Groovy implementation is here - https://github.com/palantir/language-servers/blob/develop/groovy-language-server/src/main/java/com/palantir/ls/groovy/GroovyLanguageServer.java It was difficult to know if I'm making progress, because it seemed like all the things needed to come together all at the same time. If you're jumping into working on an LSP implementation, I'd love to contribute on GitLab if you can post issues with tasks for others to complete. Duncan. On Fri, Jan 12, 2018 at 5:04 PM, Per Bothner <per@bothner.com> wrote: > Has anyone done any work for a Language Server Protocol > (https://langserver.org/) for Kawa? Any insights or partial code? > > I ask because I'm getting ready to jump into this as the next major > project for Kawa. > > (I do have one non-trivial bug It want to resolve first: > GitLab issue #33 and Savannah bug #52390, which are probably both related to > the fix for issue #11). > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ -- Duncan.
On 01/12/2018 02:31 PM, Duncan Mak wrote: > It was difficult to know if I'm making progress, because it seemed > like all the things needed to come together all at the same time. > > If you're jumping into working on an LSP implementation, I'd love to > contribute on GitLab if you can post issues with tasks for others to > complete. That's why I think I need to do at least a bare-bones implementation, since I have the Kawa big-picture. Once I have *something* working, then asking for help makes sense. -- --Per Bothner per@bothner.com http://per.bothner.com/
On Fri, Jan 12 2018, Per Bothner wrote:
> Has anyone done any work for a Language Server Protocol
> (https://langserver.org/) for Kawa? Any insights or partial code?
Just some thoughts:
- For Kawa's Java code I'm using the Emacs lsp-mode as client and
Eclipse's jdt-server. While I wouldn't call that combo great, it
certainly helps navigating the code. (I'm still using make directly to
compile things.)
- It seems to me that an LSP server would like to have something like a
"project" file that lists the interesting source files, libraries etc.
I suppose plain Makefiles will not work so well for that; maybe Ant
files would work better. Or maybe Kawa should have something like
Rust's Cargo. My guess is that this will be an important design
decision.
Helmut
On 01/14/2018 12:07 PM, Helmut Eller wrote: > - It seems to me that an LSP server would like to have something like a > "project" file that lists the interesting source files, libraries etc. > I suppose plain Makefiles will not work so well for that; maybe Ant > files would work better. Or maybe Kawa should have something like > Rust's Cargo. My guess is that this will be an important design > decision. Definitely things to ponder and research, which I have barely started on. I would like to have good defaults, so at least basic syntax checking (and syntax coloring) works even without a project file. That is one of the things I like about Emacs - you can edit a file without having create a project containing the file. I'd also like the server to be able to use import, module-name, require, and define-library forms to find definitions. However, in general one will want some kind of project file - for example for compiler options or adding jar files to a classpath. This is something I will need to study other servers for. Scanning a Makefile for project properties doesn't seem like it would be difficult - at least string-valued properties. The Makefiles would have to follow certain conventions, just like automake source files already do. -- --Per Bothner per@bothner.com http://per.bothner.com/