I'm using configure of prelude and install lsp-java recently without much configures:
- require lsp-mode, company-lsp, lsp-ui, lsp-java;
- add code for hook:
(add-hook 'java-mode-hook #'lsp)
(add-hook 'java-mode-hook 'flycheck-mode)
(add-hook 'java-mode-hook 'company-mode)
- create a test java project with git and HelloWorld.java;
- restart emacs and open HelloWorld.java by step3, emacs will auto download jdt(you may download it manually);
- when everything ready, you should see message like "LSP :: Connected to [jdtls:12693 status:starting]." when you open HelloWorld.java by step 3.
all my configure can find at:
https://github.com/RezoChiang/prelude/tree/rezo-lsp/modules