From 24151f639dc5bc24f9a90a02c2ae7319944d83cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maria=20Jos=C3=A9=20Solano?= Date: Sat, 30 Nov 2024 14:40:34 -0800 Subject: [PATCH] Add capability information to the metamodel --- protocol/src/common/protocol.callHierarchy.ts | 1 + protocol/src/common/protocol.colorProvider.ts | 1 + protocol/src/common/protocol.configuration.ts | 1 + protocol/src/common/protocol.declaration.ts | 1 + protocol/src/common/protocol.diagnostic.ts | 4 ++- .../src/common/protocol.fileOperations.ts | 6 ++++ protocol/src/common/protocol.foldingRange.ts | 2 ++ .../src/common/protocol.implementation.ts | 1 + protocol/src/common/protocol.inlayHint.ts | 3 ++ .../src/common/protocol.inlineCompletion.ts | 1 + protocol/src/common/protocol.inlineValue.ts | 2 ++ .../src/common/protocol.linkedEditingRange.ts | 1 + protocol/src/common/protocol.moniker.ts | 1 + protocol/src/common/protocol.progress.ts | 1 + .../src/common/protocol.selectionRange.ts | 1 + .../src/common/protocol.semanticTokens.ts | 4 +++ protocol/src/common/protocol.showDocument.ts | 1 + .../common/protocol.textDocumentContent.ts | 3 +- protocol/src/common/protocol.ts | 35 +++++++++++++++++++ .../src/common/protocol.typeDefinition.ts | 1 + protocol/src/common/protocol.typeHierarchy.ts | 1 + .../src/common/protocol.workspaceFolder.ts | 2 ++ 22 files changed, 72 insertions(+), 2 deletions(-) diff --git a/protocol/src/common/protocol.callHierarchy.ts b/protocol/src/common/protocol.callHierarchy.ts index 663068507..ab0e7a951 100644 --- a/protocol/src/common/protocol.callHierarchy.ts +++ b/protocol/src/common/protocol.callHierarchy.ts @@ -59,6 +59,7 @@ export namespace CallHierarchyPrepareRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.callHierarchy'; server: 'callHierarchyProvider' } = { client: 'textDocument.callHierarchy', server: 'callHierarchyProvider' }; } /** diff --git a/protocol/src/common/protocol.colorProvider.ts b/protocol/src/common/protocol.colorProvider.ts index 1e97ad77c..6547eb63c 100644 --- a/protocol/src/common/protocol.colorProvider.ts +++ b/protocol/src/common/protocol.colorProvider.ts @@ -51,6 +51,7 @@ export namespace DocumentColorRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.colorProvider'; server: 'colorProvider' } = { client: 'textDocument.colorProvider', server: 'colorProvider' }; } /** diff --git a/protocol/src/common/protocol.configuration.ts b/protocol/src/common/protocol.configuration.ts index 980cc746e..e7468d332 100644 --- a/protocol/src/common/protocol.configuration.ts +++ b/protocol/src/common/protocol.configuration.ts @@ -25,6 +25,7 @@ export namespace ConfigurationRequest { export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; export type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult; + export const capabilities: { client: 'workspace.configuration' } = { client: 'workspace.configuration' }; } diff --git a/protocol/src/common/protocol.declaration.ts b/protocol/src/common/protocol.declaration.ts index bf0c995f2..f68644a1e 100644 --- a/protocol/src/common/protocol.declaration.ts +++ b/protocol/src/common/protocol.declaration.ts @@ -52,4 +52,5 @@ export namespace DeclarationRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.declaration'; server: 'declarationProvider' } = { client: 'textDocument.declaration', server: 'declarationProvider' }; } diff --git a/protocol/src/common/protocol.diagnostic.ts b/protocol/src/common/protocol.diagnostic.ts index a24f0cfc3..30f4a4a83 100644 --- a/protocol/src/common/protocol.diagnostic.ts +++ b/protocol/src/common/protocol.diagnostic.ts @@ -13,7 +13,6 @@ import type { DiagnosticsCapabilities } from './protocol'; - /** * Client capabilities specific to diagnostic pull requests. * @@ -269,6 +268,7 @@ export namespace DocumentDiagnosticRequest { export const type = new ProtocolRequestType(method); export const partialResult = new ProgressType(); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.diagnostic'; server: 'diagnosticProvider' } = { client: 'textDocument.diagnostic', server: 'diagnosticProvider' }; } /** @@ -382,6 +382,7 @@ export namespace WorkspaceDiagnosticRequest { export const type = new ProtocolRequestType(method); export const partialResult = new ProgressType(); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.diagnostics'; server: 'diagnosticProvider.workspaceDiagnostics' } = { client: 'workspace.diagnostics', server: 'diagnosticProvider.workspaceDiagnostics' }; } /** @@ -394,4 +395,5 @@ export namespace DiagnosticRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; + export const capabilities: { client: 'workspace.diagnostics.refreshSupport' } = { client: 'workspace.diagnostics.refreshSupport' }; } diff --git a/protocol/src/common/protocol.fileOperations.ts b/protocol/src/common/protocol.fileOperations.ts index c3ee98c2b..540ffd31a 100644 --- a/protocol/src/common/protocol.fileOperations.ts +++ b/protocol/src/common/protocol.fileOperations.ts @@ -292,6 +292,7 @@ export namespace WillCreateFilesRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.fileOperations.willCreate'; server: 'workspace.fileOperations.willCreate' } = { client: 'workspace.fileOperations.willCreate', server: 'workspace.fileOperations.willCreate' }; } /** @@ -305,6 +306,7 @@ export namespace DidCreateFilesNotification { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); export type HandlerSignature = NotificationHandler; + export const capabilities: { client: 'workspace.fileOperations.didCreate'; server: 'workspace.fileOperations.didCreate' } = { client: 'workspace.fileOperations.didCreate', server: 'workspace.fileOperations.didCreate' }; } /** @@ -318,6 +320,7 @@ export namespace WillRenameFilesRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.fileOperations.willRename'; server: 'workspace.fileOperations.willRename' } = { client: 'workspace.fileOperations.willRename', server: 'workspace.fileOperations.willRename' }; } /** @@ -331,6 +334,7 @@ export namespace DidRenameFilesNotification { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); export type HandlerSignature = NotificationHandler; + export const capabilities: { client: 'workspace.fileOperations.didRename'; server: 'workspace.fileOperations.didRename' } = { client: 'workspace.fileOperations.didRename', server: 'workspace.fileOperations.didRename' }; } /** @@ -344,6 +348,7 @@ export namespace DidDeleteFilesNotification { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); export type HandlerSignature = NotificationHandler; + export const capabilities: { client: 'workspace.fileOperations.didDelete'; server: 'workspace.fileOperations.didDelete' } = { client: 'workspace.fileOperations.didDelete', server: 'workspace.fileOperations.didDelete' }; } /** @@ -357,4 +362,5 @@ export namespace WillDeleteFilesRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.fileOperations.willDelete'; server: 'workspace.fileOperations.willDelete' } = { client: 'workspace.fileOperations.willDelete', server: 'workspace.fileOperations.willDelete' }; } diff --git a/protocol/src/common/protocol.foldingRange.ts b/protocol/src/common/protocol.foldingRange.ts index 09d222d26..a3e21e70f 100644 --- a/protocol/src/common/protocol.foldingRange.ts +++ b/protocol/src/common/protocol.foldingRange.ts @@ -128,6 +128,7 @@ export namespace FoldingRangeRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.foldingRange'; server: 'foldingRangeProvider' } = { client: 'textDocument.foldingRange', server: 'foldingRangeProvider' }; } /** @@ -139,4 +140,5 @@ export namespace FoldingRangeRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; + export const capabilities: { client: 'workspace.foldingRange.refreshSupport' } = { client: 'workspace.foldingRange.refreshSupport' }; } diff --git a/protocol/src/common/protocol.implementation.ts b/protocol/src/common/protocol.implementation.ts index d5e7194f4..fbb391ba9 100644 --- a/protocol/src/common/protocol.implementation.ts +++ b/protocol/src/common/protocol.implementation.ts @@ -53,4 +53,5 @@ export namespace ImplementationRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.implementation'; server: 'implementationProvider' } = { client: 'textDocument.implementation', server: 'implementationProvider' }; } diff --git a/protocol/src/common/protocol.inlayHint.ts b/protocol/src/common/protocol.inlayHint.ts index 634a9ab9a..0d4bc678c 100644 --- a/protocol/src/common/protocol.inlayHint.ts +++ b/protocol/src/common/protocol.inlayHint.ts @@ -105,6 +105,7 @@ export namespace InlayHintRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.inlayHint'; server: 'inlayHintProvider' } = { client: 'textDocument.inlayHint', server: 'inlayHintProvider' }; } /** @@ -119,6 +120,7 @@ export namespace InlayHintResolveRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.inlayHint.resolveSupport'; server: 'inlayHintProvider.resolveProvider' } = { client: 'textDocument.inlayHint.resolveSupport', server: 'inlayHintProvider.resolveProvider' }; } /** @@ -129,4 +131,5 @@ export namespace InlayHintRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; + export const capabilities: { client: 'workspace.inlayHint.refreshSupport' } = { client: 'workspace.inlayHint.refreshSupport' }; } diff --git a/protocol/src/common/protocol.inlineCompletion.ts b/protocol/src/common/protocol.inlineCompletion.ts index d69d959c6..0754f542d 100644 --- a/protocol/src/common/protocol.inlineCompletion.ts +++ b/protocol/src/common/protocol.inlineCompletion.ts @@ -67,4 +67,5 @@ export namespace InlineCompletionRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.inlineCompletion'; server: 'inlineCompletionProvider' } = { client: 'textDocument.inlineCompletion', server: 'inlineCompletionProvider' }; } diff --git a/protocol/src/common/protocol.inlineValue.ts b/protocol/src/common/protocol.inlineValue.ts index a74a68e84..0ddb14485 100644 --- a/protocol/src/common/protocol.inlineValue.ts +++ b/protocol/src/common/protocol.inlineValue.ts @@ -90,6 +90,7 @@ export namespace InlineValueRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.inlineValue'; server: 'inlineValueProvider' } = { client: 'textDocument.inlineValue', server: 'inlineValueProvider' }; } /** @@ -100,4 +101,5 @@ export namespace InlineValueRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; + export const capabilities: { client: 'workspace.inlineValue.refreshSupport' } = { client: 'workspace.inlineValue.refreshSupport' }; } diff --git a/protocol/src/common/protocol.linkedEditingRange.ts b/protocol/src/common/protocol.linkedEditingRange.ts index 695fd11a3..6ec44ffd4 100644 --- a/protocol/src/common/protocol.linkedEditingRange.ts +++ b/protocol/src/common/protocol.linkedEditingRange.ts @@ -65,4 +65,5 @@ export namespace LinkedEditingRangeRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.linkedEditingRange'; server: 'linkedEditingRangeProvider' } = { client: 'textDocument.linkedEditingRange', server: 'linkedEditingRangeProvider' }; } diff --git a/protocol/src/common/protocol.moniker.ts b/protocol/src/common/protocol.moniker.ts index 8847fa24b..6c9be1196 100644 --- a/protocol/src/common/protocol.moniker.ts +++ b/protocol/src/common/protocol.moniker.ts @@ -130,4 +130,5 @@ export namespace MonikerRequest { export const method: 'textDocument/moniker' = 'textDocument/moniker'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.moniker'; server: 'monikerProvider' } = { client: 'textDocument.moniker', server: 'monikerProvider' }; } diff --git a/protocol/src/common/protocol.progress.ts b/protocol/src/common/protocol.progress.ts index 03dbe9863..9930697f3 100644 --- a/protocol/src/common/protocol.progress.ts +++ b/protocol/src/common/protocol.progress.ts @@ -114,6 +114,7 @@ export namespace WorkDoneProgressCreateRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'window.workDoneProgress' } = { client: 'window.workDoneProgress' }; } export interface WorkDoneProgressCancelParams { diff --git a/protocol/src/common/protocol.selectionRange.ts b/protocol/src/common/protocol.selectionRange.ts index 5523a97d5..c6677c3a1 100644 --- a/protocol/src/common/protocol.selectionRange.ts +++ b/protocol/src/common/protocol.selectionRange.ts @@ -54,4 +54,5 @@ export namespace SelectionRangeRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.selectionRange'; server: 'selectionRangeProvider' } = { client: 'textDocument.selectionRange', server: 'selectionRangeProvider' }; } diff --git a/protocol/src/common/protocol.semanticTokens.ts b/protocol/src/common/protocol.semanticTokens.ts index de8d6de46..984e8b933 100644 --- a/protocol/src/common/protocol.semanticTokens.ts +++ b/protocol/src/common/protocol.semanticTokens.ts @@ -204,6 +204,7 @@ export namespace SemanticTokensRequest { export const type = new ProtocolRequestType(method); export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method; export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.semanticTokens'; server: 'semanticTokensProvider' } = { client: 'textDocument.semanticTokens', server: 'semanticTokensProvider' }; } //------- 'textDocument/semanticTokens/edits' ----- @@ -233,6 +234,7 @@ export namespace SemanticTokensDeltaRequest { export const type = new ProtocolRequestType(method); export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method; export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.semanticTokens.requests.full.delta'; server: 'semanticTokensProvider.full.delta' } = { client: 'textDocument.semanticTokens.requests.full.delta', server: 'semanticTokensProvider.full.delta' }; } //------- 'textDocument/semanticTokens/range' ----- @@ -261,6 +263,7 @@ export namespace SemanticTokensRangeRequest { export const type = new ProtocolRequestType(method); export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method; export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.semanticTokens.requests.range'; server: 'semanticTokensProvider.range' } = { client: 'textDocument.semanticTokens.requests.range', server: 'semanticTokensProvider.range' }; } //------- 'workspace/semanticTokens/refresh' ----- @@ -289,4 +292,5 @@ export namespace SemanticTokensRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; + export const capabilities: { client: 'workspace.semanticTokens.refreshSupport' } = { client: 'workspace.semanticTokens.refreshSupport' }; } diff --git a/protocol/src/common/protocol.showDocument.ts b/protocol/src/common/protocol.showDocument.ts index 338521b8e..547854ae6 100644 --- a/protocol/src/common/protocol.showDocument.ts +++ b/protocol/src/common/protocol.showDocument.ts @@ -81,4 +81,5 @@ export namespace ShowDocumentRequest { export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; export type MiddlewareSignature = (params: ShowDocumentParams, token: CancellationToken, next: HandlerSignature) => HandlerResult; + export const capabilities: { client: 'window.showDocument.support' } = { client: 'window.showDocument.support' }; } diff --git a/protocol/src/common/protocol.textDocumentContent.ts b/protocol/src/common/protocol.textDocumentContent.ts index 545783ff2..366ac48d7 100644 --- a/protocol/src/common/protocol.textDocumentContent.ts +++ b/protocol/src/common/protocol.textDocumentContent.ts @@ -84,6 +84,7 @@ export namespace TextDocumentContentRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.textDocumentContent'; server: 'workspace.textDocumentContent' } = { client: 'workspace.textDocumentContent', server: 'workspace.textDocumentContent' }; } /** @@ -111,4 +112,4 @@ export namespace TextDocumentContentRefreshRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; -} \ No newline at end of file +} diff --git a/protocol/src/common/protocol.ts b/protocol/src/common/protocol.ts index a8ad848da..1b6d70b72 100644 --- a/protocol/src/common/protocol.ts +++ b/protocol/src/common/protocol.ts @@ -1674,6 +1674,7 @@ export namespace DidChangeConfigurationNotification { export const method: 'workspace/didChangeConfiguration' = 'workspace/didChangeConfiguration'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'workspace.didChangeConfiguration' } = { client: 'workspace.didChangeConfiguration' }; } export interface DidChangeConfigurationRegistrationOptions { @@ -1746,6 +1747,7 @@ export namespace ShowMessageNotification { export const method: 'window/showMessage' = 'window/showMessage'; export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'window.showMessage' } = { client: 'window.showMessage' }; } /** @@ -1809,6 +1811,7 @@ export namespace ShowMessageRequest { export const method: 'window/showMessageRequest' = 'window/showMessageRequest'; export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'window.showMessage' } = { client: 'window.showMessage' }; } /** @@ -1962,6 +1965,7 @@ export namespace DidOpenTextDocumentNotification { export const method: 'textDocument/didOpen' = 'textDocument/didOpen'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.synchronization'; server: 'textDocumentSync' } = { client: 'textDocument.synchronization', server: 'textDocumentSync' }; } /** @@ -2069,6 +2073,7 @@ export namespace DidChangeTextDocumentNotification { export const method: 'textDocument/didChange' = 'textDocument/didChange'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.synchronization'; server: 'textDocumentSync' } = { client: 'textDocument.synchronization', server: 'textDocumentSync' }; } /** @@ -2094,6 +2099,7 @@ export namespace DidCloseTextDocumentNotification { export const method: 'textDocument/didClose' = 'textDocument/didClose'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.synchronization'; server: 'textDocumentSync' } = { client: 'textDocument.synchronization', server: 'textDocumentSync' }; } /** @@ -2126,6 +2132,7 @@ export namespace DidSaveTextDocumentNotification { export const method: 'textDocument/didSave' = 'textDocument/didSave'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.synchronization.didSave'; server: 'textDocumentSync.save' } = { client: 'textDocument.synchronization.didSave', server: 'textDocumentSync.save' }; } /** @@ -2175,6 +2182,7 @@ export namespace WillSaveTextDocumentNotification { export const method: 'textDocument/willSave' = 'textDocument/willSave'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.synchronization.willSave'; server: 'textDocumentSync.willSave' } = { client: 'textDocument.synchronization.willSave', server: 'textDocumentSync.willSave' }; } /** @@ -2189,6 +2197,7 @@ export namespace WillSaveTextDocumentWaitUntilRequest { export const method: 'textDocument/willSaveWaitUntil' = 'textDocument/willSaveWaitUntil'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.synchronization.willSaveWaitUntil'; server: 'textDocumentSync.willSaveWaitUntil' } = { client: 'textDocument.synchronization.willSaveWaitUntil', server: 'textDocumentSync.willSaveWaitUntil' }; } //---- File eventing ---- @@ -2218,6 +2227,7 @@ export namespace DidChangeWatchedFilesNotification { export const method: 'workspace/didChangeWatchedFiles' = 'workspace/didChangeWatchedFiles'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'workspace.didChangeWatchedFiles' } = { client: 'workspace.didChangeWatchedFiles' }; } /** @@ -2452,6 +2462,7 @@ export namespace PublishDiagnosticsNotification { export const method: 'textDocument/publishDiagnostics' = 'textDocument/publishDiagnostics'; export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolNotificationType(method); + export const capabilities: { client: 'textDocument.publishDiagnostics' } = { client: 'textDocument.publishDiagnostics' }; } //---- Completion Support -------------------------- @@ -2787,6 +2798,7 @@ export namespace CompletionRequest { export const method: 'textDocument/completion' = 'textDocument/completion'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.completion'; server: 'completionProvider' } = { client: 'textDocument.completion', server: 'completionProvider' }; } /** @@ -2798,6 +2810,7 @@ export namespace CompletionResolveRequest { export const method: 'completionItem/resolve' = 'completionItem/resolve'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.completion.completionItem.resolveSupport'; server: 'completionProvider.resolveProvider' } = { client: 'textDocument.completion.completionItem.resolveSupport', server: 'completionProvider.resolveProvider' }; } //---- Hover Support ------------------------------- @@ -2842,6 +2855,7 @@ export namespace HoverRequest { export const method: 'textDocument/hover' = 'textDocument/hover'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.hover'; server: 'hoverProvider' } = { client: 'textDocument.hover', server: 'hoverProvider' }; } //---- SignatureHelp ---------------------------------- @@ -3018,6 +3032,7 @@ export namespace SignatureHelpRequest { export const method: 'textDocument/signatureHelp' = 'textDocument/signatureHelp'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.signatureHelp'; server: 'signatureHelpProvider' } = { client: 'textDocument.signatureHelp', server: 'signatureHelpProvider' }; } //---- Goto Definition ------------------------------------- @@ -3067,6 +3082,7 @@ export namespace DefinitionRequest { export const method: 'textDocument/definition' = 'textDocument/definition'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.definition'; server: 'definitionProvider' } = { client: 'textDocument.definition', server: 'definitionProvider' }; } //---- Reference Provider ---------------------------------- @@ -3110,6 +3126,7 @@ export namespace ReferencesRequest { export const method: 'textDocument/references' = 'textDocument/references'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.references'; server: 'referencesProvider' } = { client: 'textDocument.references', server: 'referencesProvider' }; } //---- Document Highlight ---------------------------------- @@ -3152,6 +3169,7 @@ export namespace DocumentHighlightRequest { export const method: 'textDocument/documentHighlight' = 'textDocument/documentHighlight'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.documentHighlight'; server: 'documentHighlightProvider' } = { client: 'textDocument.documentHighlight', server: 'documentHighlightProvider' }; } //---- Document Symbol Provider --------------------------- @@ -3233,6 +3251,7 @@ export namespace DocumentSymbolRequest { export const method: 'textDocument/documentSymbol' = 'textDocument/documentSymbol'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.documentSymbol'; server: 'documentSymbolProvider' } = { client: 'textDocument.documentSymbol', server: 'documentSymbolProvider' }; } //---- Code Action Provider ---------------------------------- @@ -3457,6 +3476,7 @@ export namespace CodeActionRequest { export const method: 'textDocument/codeAction' = 'textDocument/codeAction'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.codeAction'; server: 'codeActionProvider' } = { client: 'textDocument.codeAction', server: 'codeActionProvider' }; } /** @@ -3468,6 +3488,7 @@ export namespace CodeActionResolveRequest { export const method: 'codeAction/resolve' = 'codeAction/resolve'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.codeAction.resolveSupport'; server: 'codeActionProvider.resolveProvider' } = { client: 'textDocument.codeAction.resolveSupport', server: 'codeActionProvider.resolveProvider' }; } //---- Workspace Symbol Provider --------------------------- @@ -3594,6 +3615,7 @@ export namespace WorkspaceSymbolRequest { export const method: 'workspace/symbol' = 'workspace/symbol'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'workspace.symbol'; server: 'workspaceSymbolProvider' } = { client: 'workspace.symbol', server: 'workspaceSymbolProvider' }; } /** @@ -3606,6 +3628,7 @@ export namespace WorkspaceSymbolResolveRequest { export const method: 'workspaceSymbol/resolve' = 'workspaceSymbol/resolve'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'workspace.symbol.resolveSupport'; server: 'workspaceSymbolProvider.resolveProvider' } = { client: 'workspace.symbol.resolveSupport', server: 'workspaceSymbolProvider.resolveProvider' }; } //---- Code Lens Provider ------------------------------------------- @@ -3687,6 +3710,7 @@ export namespace CodeLensRequest { export const method: 'textDocument/codeLens' = 'textDocument/codeLens'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.codeLens'; server: 'codeLensProvider' } = { client: 'textDocument.codeLens', server: 'codeLensProvider' }; } /** @@ -3696,6 +3720,7 @@ export namespace CodeLensResolveRequest { export const method: 'codeLens/resolve' = 'codeLens/resolve'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.codeLens.resolveSupport'; server: 'codeLensProvider.resolveProvider' } = { client: 'textDocument.codeLens.resolveSupport', server: 'codeLensProvider.resolveProvider' }; } /** @@ -3707,6 +3732,7 @@ export namespace CodeLensRefreshRequest { export const method: `workspace/codeLens/refresh` = `workspace/codeLens/refresh`; export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType0(method); + export const capabilities: { client: 'workspace.codeLens' } = { client: 'workspace.codeLens' }; } //---- Document Links ---------------------------------------------- @@ -3760,6 +3786,7 @@ export namespace DocumentLinkRequest { export const method: 'textDocument/documentLink' = 'textDocument/documentLink'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.documentLink'; server: 'documentLinkProvider' } = { client: 'textDocument.documentLink', server: 'documentLinkProvider' }; } /** @@ -3771,6 +3798,7 @@ export namespace DocumentLinkResolveRequest { export const method: 'documentLink/resolve' = 'documentLink/resolve'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.documentLink'; server: 'documentLinkProvider.resolveProvider' } = { client: 'textDocument.documentLink', server: 'documentLinkProvider.resolveProvider' }; } //---- Formatting ---------------------------------------------- @@ -3819,6 +3847,7 @@ export namespace DocumentFormattingRequest { export const method: 'textDocument/formatting' = 'textDocument/formatting'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.formatting'; server: 'documentFormattingProvider' } = { client: 'textDocument.formatting', server: 'documentFormattingProvider' }; } /** @@ -3920,6 +3949,7 @@ export namespace DocumentRangesFormattingRequest { export const method: 'textDocument/rangesFormatting' = 'textDocument/rangesFormatting'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.rangeFormatting'; server: 'documentRangeFormattingProvider' } = { client: 'textDocument.rangeFormatting', server: 'documentRangeFormattingProvider' }; } /** @@ -3991,6 +4021,7 @@ export namespace DocumentOnTypeFormattingRequest { export const method: 'textDocument/onTypeFormatting' = 'textDocument/onTypeFormatting'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.onTypeFormatting'; server: 'documentOnTypeFormattingProvider' } = { client: 'textDocument.onTypeFormatting', server: 'documentOnTypeFormattingProvider' }; } //---- Rename ---------------------------------------------- @@ -4088,6 +4119,7 @@ export namespace RenameRequest { export const method: 'textDocument/rename' = 'textDocument/rename'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.rename'; server: 'renameProvider' } = { client: 'textDocument.rename', server: 'renameProvider' }; } export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams { @@ -4119,6 +4151,7 @@ export namespace PrepareRenameRequest { export const method: 'textDocument/prepareRename' = 'textDocument/prepareRename'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'textDocument.rename.prepareSupport'; server: 'renameProvider.prepareProvider' } = { client: 'textDocument.rename.prepareSupport', server: 'renameProvider.prepareProvider' }; } //---- Command Execution ------------------------------------------- @@ -4172,6 +4205,7 @@ export namespace ExecuteCommandRequest { export const method: 'workspace/executeCommand' = 'workspace/executeCommand'; export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); + export const capabilities: { client: 'workspace.executeCommand'; server: 'executeCommandProvider' } = { client: 'workspace.executeCommand', server: 'executeCommandProvider' }; } //---- Apply Edit request ---------------------------------------- @@ -4310,6 +4344,7 @@ export namespace ApplyWorkspaceEditRequest { export const messageDirection: MessageDirection = MessageDirection.serverToClient; export const type = new ProtocolRequestType('workspace/applyEdit'); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'workspace.applyEdit' } = { client: 'workspace.applyEdit' }; } export { diff --git a/protocol/src/common/protocol.typeDefinition.ts b/protocol/src/common/protocol.typeDefinition.ts index 528216bdc..d71ed8042 100644 --- a/protocol/src/common/protocol.typeDefinition.ts +++ b/protocol/src/common/protocol.typeDefinition.ts @@ -53,4 +53,5 @@ export namespace TypeDefinitionRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.typeDefinition'; server: 'typeDefinitionProvider' } = { client: 'textDocument.typeDefinition', server: 'typeDefinitionProvider' }; } diff --git a/protocol/src/common/protocol.typeHierarchy.ts b/protocol/src/common/protocol.typeHierarchy.ts index da2899641..0c7eb6581 100644 --- a/protocol/src/common/protocol.typeHierarchy.ts +++ b/protocol/src/common/protocol.typeHierarchy.ts @@ -56,6 +56,7 @@ export namespace TypeHierarchyPrepareRequest { export const messageDirection: MessageDirection = MessageDirection.clientToServer; export const type = new ProtocolRequestType(method); export type HandlerSignature = RequestHandler; + export const capabilities: { client: 'textDocument.typeHierarchy'; server: 'typeHierarchyProvider' } = { client: 'textDocument.typeHierarchy', server: 'typeHierarchyProvider' }; } /** diff --git a/protocol/src/common/protocol.workspaceFolder.ts b/protocol/src/common/protocol.workspaceFolder.ts index d9d6e1c7d..75e3de778 100644 --- a/protocol/src/common/protocol.workspaceFolder.ts +++ b/protocol/src/common/protocol.workspaceFolder.ts @@ -49,6 +49,7 @@ export namespace WorkspaceFoldersRequest { export const type = new ProtocolRequestType0(method); export type HandlerSignature = RequestHandler0; export type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult; + export const capabilities: { client: 'workspace.workspaceFolders'; server: 'workspace.workspaceFolders' } = { client: 'workspace.workspaceFolders', server: 'workspace.workspaceFolders' }; } /** @@ -61,6 +62,7 @@ export namespace DidChangeWorkspaceFoldersNotification { export const type = new ProtocolNotificationType(method); export type HandlerSignature = NotificationHandler; export type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void; + export const capabilities: { server: 'workspace.workspaceFolders.changeNotifications' } = { server: 'workspace.workspaceFolders.changeNotifications' }; } /**