-
-
Notifications
You must be signed in to change notification settings - Fork 953
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
Server-specific options are not used for workspace/configuration
response
#2495
Comments
It's expected, you need coc extension |
Would you accept a PR changing this behavior? The current behavior makes no sense. At the very least, it should be documented. |
It should be bug of your language server, you can provide verbose output |
This can't be a bug of the language server, since the server has no control over how CoC builds the response to the |
For configured languageserver, only use configured settings from languageserver section. Closes #2495
Fixed, configuration for user defined language server read configuration from settings field only. |
Hmm... actually this commit does not seem to have fixed the problem. What happens now is that settings aren't read from either the top level or the server specific settings. I see this in the log for
Even though I have
|
Avoid |
Describe the bug
For language servers configured without a CoC extension (i.e. those under the "languageserver" field in the settings), the
workspace/configuration
request is not correctly handled. When CoC receives this request, it should build the response from the content of `"languageserver"/""/"settings". Instead CoC looks at the top level of the configuration for the keys.This is a problem for some language servers that do not initialize all settings with
workspace/didChangeConfiguration
request on startup (which is populated by thesettings
). For example, some settings in Microsoft'spylance
appear to be set only via the response to the server'sworkspace/configuration
request:In order to return the appropriate response,
coc-settings.json
must have havepython.*
settings defined at the top level, which CoC complains about because it doesn't know about these settings.Reproduce the bug
This should be reproducible with any language server that sends a
workspace/configuration
request. Pylance is an example. Configure the language server withtrace.server
verbose
and check the Coc log. You will see that the response toworkspace/configuration
is built from the top level and not from the language server settings.The text was updated successfully, but these errors were encountered: