-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix javalsp command callback. #2558
Fix javalsp command callback. #2558
Conversation
The command used to invoke the language server is missing some options to include additional java modules. Without these modules the server was not working properly. The correct command can be found in a `launcher` script on the same directory the `java` executable for the language server is found. This commit changes the docs to prefer the launcher script over the java executable. For backward compatibility it also fixes the command invocation in case the java executable is configured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think launcher
is probably an executable name that's too generic and might cause other programs to be run. Is there a set of locations where the launcher
script is likely to be installed, say in your HOME directory? It might be a better idea to look for the language server script in those directories first, and fall back on launching the language server with java
if the script cannot be found.
The default binary "launcher" is too generic and can get mixed with other tools. To use this linter user must explicitly set the absolute path of the launcher path.
@w0rp I thought about this for a while and cannot really find a way to prevent getting the wrong binary . The only solution I can see is to force users to explicitly set a value for When installing the java-language-server manually there is no pre-defined location so it can be anywhere on the users home dir and when installing it via VSCode plugin there is no binary at all. Not sure how vscode invokes the language server. Falling back to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine.
Cheers! 🍻 |
The command used to invoke the language server is missing some options
to include additional java modules. Without these modules the server
was not working properly.
The correct command can be found in a
launcher
script on the samedirectory the
java
executable for the language server is found.This commit changes the docs to prefer the launcher script over the java
executable. For backward compatibility it also fixes the command
invocation in case the java executable is configured.