Made a video showing how to use Emacs and Eglot for programming Java. Includes Lombok annotation processing, running JUnit, tests, API doc at point and much more!
https://www.youtube.com/watch?v=fd7xcTG5Z_s
Slides and conf:
-
https://github.com/skybert/skybert-talks/tree/main/emacs-java-eglot
-
https://gitlab.com/skybert/my-little-friends/-/blob/master/emacs/.emacs
Videos
So I'm trying eglot and I've just enabled it manually while I'm still trying and figuring things out with `M-x eglot` in my Main.java file. Things seem to work and it is really doing a good job so far! My only issue is, if I try to "go to definition" of one of the builtin classes or the ones that are provided from maven, it doesn't go there as expected. For instance, `import picocli.CommandLine.Command` if the cursor is on Command and I try to go to definition, it just doesn't go there and the minibuffer highlights the Command part for a second. The same thing for the java builtin methods. such as System.out.println. Is there a way to make them work?
$SUBJ
I managed to make eglot-java find jdtls, and it successfully checks syntax, but it cannot find Android's classpath, and I can't find its support for Gradle.
I have eglot enabled for rust, c, c++ and python with no problem, I simply had to add (add-hook 'language-mode-hook 'eglot-ensure) and it worked but it doesn't for java, any idea why?