Skip to content
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

How do you check whether a client supports workspace/didChangeWorkspaceFolders? #391

Closed
bzoracler opened this issue Aug 26, 2024 · 1 comment
Assignees

Comments

@bzoracler
Copy link

With the lsprotocol.types.WorkspaceClientCapabilities object, I understand that you can check other client capabilities like

  • workspace/configuration
  • workspace/didChangeConfiguration
  • workspace/workspaceFolders

However, there is no corresponding field for workspace/didChangeWorkspaceFolders. How do you determine whether a client supports this capability?

A more general question - why is this field missing from the WorkspaceClientCapabilities?

@karthiknadig
Copy link
Member

This should be filed on the LSP spec here ( https://github.com/microsoft/vscode-languageserver-node/issues ). This repo is for implementations based on the LSP spec model (https://github.com/microsoft/vscode-languageserver-node/blob/main/protocol/metaModel.json). Any changes to types or new fields go into the model there.

For workspace/didChangeConfiguration, the spec defines it like this:

        {
            "method": "workspace/didChangeConfiguration",
            "typeName": "DidChangeConfigurationNotification",
            "messageDirection": "clientToServer",
            "params": {
                "kind": "reference",
                "name": "DidChangeConfigurationParams"
            },
            "registrationOptions": {
                "kind": "reference",
                "name": "DidChangeConfigurationRegistrationOptions"
            },
            "documentation": "The configuration change notification is sent from the client to the server\nwhen the client's configuration has changed. The notification contains\nthe changed configuration as defined by the language client."
        },

For workspace/didChangeWorkspaceFolders, the spec defines it like this:

        {
            "method": "workspace/didChangeWorkspaceFolders",
            "typeName": "DidChangeWorkspaceFoldersNotification",
            "messageDirection": "clientToServer",
            "params": {
                "kind": "reference",
                "name": "DidChangeWorkspaceFoldersParams"
            },
            "documentation": "The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace\nfolder configuration changes."
        }

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants