How can I set up LSP mode manually for Java in Emacs?
- Install
lsp-modeandlsp-javain Emacs. - Install
flycheck(lsp-javadoesn't seem to work with the built-inflymakein Emacs 27.1). - Download Eclipse JDT Language Server from https://projects.eclipse.org/projects/eclipse.jdt.ls, Downloads > Milestones builds > 0.70 > jdt-language-server-0.70.0-202103051608.tar.gz
- Set Emacs variable
lsp-java-server-install-dirto extracted folder. - Download Java Debug Server for Visual Studio Code and build it using
mvnhttps://github.com/microsoft/java-debug - Copy
com.microsoft.java.debug.plugin-0.30.0.jarfromjava-debug\com.microsoft.java.debug.plugin\target\tojdt-language-server-0.70.0-202103051608\bundles\ (add-hook 'java-mode-hook #'lsp)
Note: lsp-java does support an automatic installation option; it's always interesting to see what goes on under the hood!
No comments:
Post a Comment