-
Notifications
You must be signed in to change notification settings - Fork 28
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
Exception raised if workspace/configuration
request from server to client does not get passed a section
#466
Comments
Could you create a PR please |
It would be nice to clarify that. Could you create an issue at https://github.com/microsoft/vscode-languageserver-node/issues please. |
TL;DR the LSP specs leave the behaviour undefined, so the decision is up to LSP4IJ on what to do upon a
From the specification (emphases mine):
I interpret this as: The server must advertise what section it's going to request (such as In light of this, whether See also some discussion about the uncertainty of what |
Why it is your preferred behavior? Me I think it should be better to return null. @fbricon have you some opinion about that? |
I have a weak preference for sending the entire configuration object, because I believe that configuration requests usually request a statically-defined section, so a If a |
Thanks for your reply. Do you know the behaviour of vscode? Could you create a PR this week, because we will release 0.6.0 next week? |
I didn't run it, but based on https://github.com/microsoft/vscode-languageserver-node/blob/62b3198a95ac9af13e04a27248b28951064546f9/client/src/common/configuration.ts#L75-L83, it looks like passing a falsey value to I guess my initial intuition about VSCode wasn't correct:
|
If I understand your PR have the same behaviour than vscode, right? |
Yes, that's my understanding of the TypeScript source. However, I didn't have a chance to set up a VSCode language client/server project to confirm this behaviour. |
When retrieving configuration settings through
workspace/configuration
, the language server specifications allows leavingsection
unspecified:However, if
section
is not provided, LSP4IJ raises an exception1.I think a default behaviour should be implemented when
section
is not specified - such as (1) returning the entire configuration object, which is my preference, or (2) returningnull
.com.redhat.devtools.lsp4ij.client.LanguageClientImpl.findSettings
lsp4ij/src/main/java/com/redhat/devtools/lsp4ij/client/LanguageClientImpl.java
Line 227 in 6a561e0
The text was updated successfully, but these errors were encountered: