java-language-server
java-language-server copied to clipboard
lombok support?
the vscode extension works great with bazel, which is nice, but getters/setters of lombok classes are not recognized. vscode's lombok extension seemed to only work with the eclipse-based language server
+1 lombok support.
I'm not really a lombok user so this is going to have to be a PR from someone who uses/loves lombok and wants to make this happen...
I'm not sure but AFAIK, it should be possible to add lombok support with:
- add
-javaagent:/path/to/lombok.jar
- add
-Xbootclasspath/a:/path/to/lombok.jar
- remove
-proc:none
At least, I could remove compilation errors on my java project using lombok.jar.
Here's a repo with an extremely simple repro case if anyone is interested in digging into this issue. With the current java-language-server configured w/ vim:
Once this is fixed, this "cannot find symbol" error should not be reported.
Turning on annotation processing in the compilation stage (by omitting -proc:none
from the compiler options) confronts a conflict I'm unsure how to resolve. The JavaCompilerService#compile
method accommodates multiple sources files. However, the CompileTask#root
method disallows multiple compilation roots. Since annotation processors can produce additional source files, it seems a precursor to unblocking annotation processor support will be to enable compilation of multiple roots. @georgewfraser do you remember why you added this prohibition?
@mattn Can you please add more details on how you did it? thanks.