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
C-h tfor the Emacs tutorial. If you already are, and the README doesn't give you the information you need, it's a good idea to start withC-h mordescribe-mode. That should tell you the relevant bindings. From there useC-h f,describe-function. It's convention to name Emacs packages with a prefix. Forlsp-java, it'slsp-. Do aC-h f lsp-. If the package is any good, the functions should be intuitive and the docstrings helpful. – Lorem Ipsum Feb 20 '19 at 14:59"lsp-java" tutorialhelp? – Drew Feb 20 '19 at 21:29