You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My language server recently started getting used with a language client (neovim lsp) that provides the following intialize extract for the client workspace capabilities:
As you can see, workspace.configuration == true, but there is no workspace.didChangeConfiguration.
In the current OmniSharp implementation, the API to trigger a workspace/configuration request from server to client, seems to be in two places in the DidChangeConfigurationProvider class:
The former GetConfiguration includes a check for _capability == null and will not send the workspace/configuration request if it is null. Unfortunately, this capability is only true if the workspace.didChangeConfiguration client capability is declared. So in my case, no request is issued, even if the language client does support workspace.configuration.
The latter GetScopedConfiguration does not include a capability check. So in my case, I've been able to work around it by switching to scoped configuration. However, this is also not technically correct, as both methods should do a capability check - just for the workspace.configuration capability, not the workspace.didChangeconfiguration capability.
I'd be happy to prepare a PR, but some guidance would be helpful, as there seems to be a lot of autogenerated code in the handling of the capabilities, and the handling of both configuration changes, and configuration retrieval in the same class DidChangeConfigurationProvider might be confusing things.
If someone can provide a high level description of the appropriate way to address this, I'd be happy to execute it.
Thanks!
The text was updated successfully, but these errors were encountered:
…e/configuration` (#58)
* fix(language-server): support LSP clients that only support `workspace/configuration`.
See OmniSharp/csharp-language-server-protocol#1101 for the upstream bug that necessitates this. We can revert to unscoped configuration when that is resolved.
* docs(neovim): update instructions to illustrate setting a custom definitions file location
Hi there,
My language server recently started getting used with a language client (neovim lsp) that provides the following
intialize
extract for the client workspace capabilities:As you can see,
workspace.configuration == true
, but there is noworkspace.didChangeConfiguration
.In the current OmniSharp implementation, the API to trigger a
workspace/configuration
request from server to client, seems to be in two places in theDidChangeConfigurationProvider
class:The former
GetConfiguration
includes a check for_capability == null
and will not send theworkspace/configuration
request if it is null. Unfortunately, this capability is only true if theworkspace.didChangeConfiguration
client capability is declared. So in my case, no request is issued, even if the language client does supportworkspace.configuration
.The latter
GetScopedConfiguration
does not include a capability check. So in my case, I've been able to work around it by switching to scoped configuration. However, this is also not technically correct, as both methods should do a capability check - just for theworkspace.configuration
capability, not theworkspace.didChangeconfiguration
capability.I'd be happy to prepare a PR, but some guidance would be helpful, as there seems to be a lot of autogenerated code in the handling of the capabilities, and the handling of both configuration changes, and configuration retrieval in the same class
DidChangeConfigurationProvider
might be confusing things.If someone can provide a high level description of the appropriate way to address this, I'd be happy to execute it.
Thanks!
The text was updated successfully, but these errors were encountered: