0

I have managed to install lsp-java according to their git Readme (https://github.com/emacs-lsp/lsp-java) and created my workspace.

Is there a better way (eg. in form of a documentation or tutorial) to get to known with lsp-java or do I have to try out every single possible command and see what is going to happen?

  • Are you already familiar with Emacs? It looks like the package assumes that you are. If you're not, do C-h t for 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 with C-h m or describe-mode. That should tell you the relevant bindings. From there use C-h f, describe-function. It's convention to name Emacs packages with a prefix. For lsp-java, it's lsp-. Do a C-h f lsp-. If the package is any good, the functions should be intuitive and the docstrings helpful. – Lorem Ipsum Feb 20 at 14:59
  • If you find the package useful, yet the documentation lacking, write up the documentation you would have liked to see (using your hard-won knowledge). Your input is valuable! stackoverflow.com/questions/14680711/… – Lorem Ipsum Feb 20 at 15:01
  • Does googling for "lsp-java" tutorial help? – Drew Feb 20 at 21:29
  • If it helped, I would not have asked here :) I even disabled looking for Liskov's Substitution. – beginner Feb 20 at 21:48
0

I'm using configure of prelude and install lsp-java recently without much configures:

  1. require lsp-mode, company-lsp, lsp-ui, lsp-java;
  2. add code for hook:
(add-hook 'java-mode-hook #'lsp)
(add-hook 'java-mode-hook 'flycheck-mode)
(add-hook 'java-mode-hook 'company-mode)
  1. create a test java project with git and HelloWorld.java;
  2. restart emacs and open HelloWorld.java by step3, emacs will auto download jdt(you may download it manually);
  3. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.