Add WorkspaceFoldersClientCapabilities

This commit is contained in:
Maria José Solano 2025-05-03 13:35:48 -07:00
parent bafb62a77e
commit 27ffef283f
2 changed files with 57 additions and 3 deletions

View file

@ -2081,6 +2081,7 @@
"method": "workspace/didChangeWorkspaceFolders",
"typeName": "DidChangeWorkspaceFoldersNotification",
"messageDirection": "clientToServer",
"clientCapability": "workspace.workspaceFolders.changeNotifications",
"serverCapability": "workspace.workspaceFolders.changeNotifications",
"params": {
"kind": "reference",
@ -11206,8 +11207,17 @@
{
"name": "workspaceFolders",
"type": {
"kind": "base",
"name": "boolean"
"kind": "or",
"items": [
{
"kind": "base",
"name": "boolean"
},
{
"kind": "reference",
"name": "WorkspaceFoldersClientCapabilities"
}
]
},
"optional": true,
"documentation": "The client has support for workspace folders.\n\n@since 3.6.0",
@ -12256,6 +12266,33 @@
],
"documentation": "The client capabilities of a {@link ExecuteCommandRequest}."
},
{
"name": "WorkspaceFoldersClientCapabilities",
"properties": [
{
"name": "changeNotifications",
"type": {
"kind": "literal",
"value": {
"properties": [
{
"name": "dynamicRegistration",
"type": {
"kind": "base",
"name": "boolean"
},
"optional": true,
"documentation": "Whether the client supports dynamic registration for the\n`workspace/didChangeWorkspaceFolders` notification."
}
]
}
},
"optional": true,
"documentation": "The client has support for workspace folder change notifications.\n\n@since 3.18.0",
"since": "3.18.0"
}
]
},
{
"name": "SemanticTokensWorkspaceClientCapabilities",
"properties": [

View file

@ -8,7 +8,24 @@ The `workspace/workspaceFolders` request is sent from the server to the client t
_Client Capability_:
* property path (optional): `workspace.workspaceFolders`
* property type: `boolean`
* property type: `boolean | WorkspaceFoldersClientCapabilities` where `WorkspaceFoldersClientCapabilities` is defined as follows:
```typescript
export interface WorkspaceFoldersClientCapabilities {
/**
* The client has support for workspace folder change notifications.
*
* @since 3.18.0
*/
changeNotifications?: {
/**
* Whether the client supports dynamic registration for the
* `workspace/didChangeWorkspaceFolders` notification.
*/
dynamicRegistration?: boolean;
};
}
```
_Server Capability_:
* property path (optional): `workspace.workspaceFolders`