Added support for new Eclipse JDT Python script #868
manuel-uberti
started this conversation in
General
Replies: 2 comments 2 replies
-
I think -data still needs to be given? This is mentioned in the jdtls readme for running the script, but I've also noticed that the jdtls seems to get the project wrong if this isn't set (although I don't completely understand why). |
Beta Was this translation helpful? Give feedback.
2 replies
-
Can the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
#864 changes how Eglot interacts with the Eclipse JDT LSP server by taking advantage of a recent addition to that server, a "friendly start up script". This finally makes the Eclipse JDT server function the same way as virtually all other servers that Eglot lists in
eglot-server-programs
for out-of-the-box support.In practical terms, new versions of Eclipse JDT come with a new
jdtls
Python script that sets up the server with the default options Eglot needs to work with it.Setup
jdtls
scriptIn order for
jdtls
to work, you will need:jdtls
program lives in thebin
directory of the release archive found at http://download.eclipse.org/jdtls/milestones/.For Eglot to use
jdtls
, make sure it is available in your$PATH
environment variable. For instance:In your Java projects, navigate to a
java-mode
file. You can now use M-x eglot and everything should be working as expected.If something's off, please consider where the root of the problem might lie. Likely it's not Eglot, just that the
jdtls
script isn't performing correctly or you may need to add some arguments to its invocation.Refer to Eclipse JDT README for details.
Restore previous JDT interface in your
.emacs
orinit.el
If, for some reason, you cannot make
jdtls
work on your system (e.g. you do not have access to a recent Python version), youcan easily restore the previous interface by adding some code to your
.emacs
or~/.emacs.d/init.el
initialization file.This effectively restores the code that #864 removed from
eglot.el
.Beta Was this translation helpful? Give feedback.
All reactions