vscode-languageserver-protocol 3.17.6-next.8 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/eslint.config.js +13 -0
- package/lib/browser/main.js +1 -2
- package/lib/common/connection.d.ts +13 -13
- package/lib/common/connection.js +1 -2
- package/lib/common/messages.d.ts +7 -0
- package/lib/common/messages.js +8 -1
- package/lib/common/protocol.callHierarchy.d.ts +5 -2
- package/lib/common/protocol.callHierarchy.js +3 -0
- package/lib/common/protocol.colorProvider.d.ts +5 -3
- package/lib/common/protocol.colorProvider.js +3 -1
- package/lib/common/protocol.configuration.d.ts +2 -1
- package/lib/common/protocol.configuration.js +1 -0
- package/lib/common/protocol.d.ts +112 -34
- package/lib/common/protocol.declaration.d.ts +3 -2
- package/lib/common/protocol.declaration.js +1 -0
- package/lib/common/protocol.diagnostic.d.ts +11 -2
- package/lib/common/protocol.diagnostic.js +20 -7
- package/lib/common/protocol.fileOperations.d.ts +8 -2
- package/lib/common/protocol.fileOperations.js +6 -0
- package/lib/common/protocol.foldingRange.d.ts +6 -5
- package/lib/common/protocol.foldingRange.js +4 -1
- package/lib/common/protocol.implementation.d.ts +3 -2
- package/lib/common/protocol.implementation.js +1 -0
- package/lib/common/protocol.inlayHint.d.ts +5 -2
- package/lib/common/protocol.inlayHint.js +3 -0
- package/lib/common/protocol.inlineCompletion.d.ts +3 -7
- package/lib/common/protocol.inlineCompletion.js +1 -1
- package/lib/common/protocol.inlineValue.d.ts +7 -6
- package/lib/common/protocol.inlineValue.js +2 -0
- package/lib/common/protocol.js +57 -11
- package/lib/common/protocol.linkedEditingRange.d.ts +3 -2
- package/lib/common/protocol.linkedEditingRange.js +1 -0
- package/lib/common/protocol.moniker.d.ts +3 -2
- package/lib/common/protocol.moniker.js +1 -0
- package/lib/common/protocol.notebook.js +17 -7
- package/lib/common/protocol.progress.d.ts +2 -1
- package/lib/common/protocol.progress.js +1 -0
- package/lib/common/protocol.selectionRange.d.ts +3 -2
- package/lib/common/protocol.selectionRange.js +1 -0
- package/lib/common/protocol.semanticTokens.d.ts +6 -2
- package/lib/common/protocol.semanticTokens.js +4 -0
- package/lib/common/protocol.showDocument.d.ts +2 -1
- package/lib/common/protocol.showDocument.js +1 -0
- package/lib/common/protocol.textDocumentContent.d.ts +93 -0
- package/lib/common/protocol.textDocumentContent.js +33 -0
- package/lib/common/protocol.typeDefinition.d.ts +3 -2
- package/lib/common/protocol.typeDefinition.js +2 -1
- package/lib/common/protocol.typeHierarchy.d.ts +3 -2
- package/lib/common/protocol.typeHierarchy.js +1 -0
- package/lib/common/protocol.workspaceFolder.d.ts +3 -1
- package/lib/common/protocol.workspaceFolder.js +2 -0
- package/lib/common/utils/is.js +9 -10
- package/lib/node/main.d.ts +0 -1
- package/lib/node/main.js +1 -2
- package/metaModel.schema.json +18 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# VSCode Language Server - Protocol Module
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/vscode-
|
|
4
|
-
[](https://npmjs.org/package/vscode-
|
|
5
|
-
[](https://npmjs.org/package/vscode-languageserver-protocol)
|
|
4
|
+
[](https://npmjs.org/package/vscode-languageserver-protocol)
|
|
5
|
+
[](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)
|
|
6
6
|
|
|
7
7
|
This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application. Please note that the protocol is versioned using the LSP specification version number. Since the protocol depends on the `vscode-jsonrpc` version a a breaking change on that dependencies might not be reflected in a major version change of this module. Changing the major version number in these cases was more confusing this it would result in a version mismatch between the protocol and the LSP specification.
|
|
8
8
|
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { createConfig } = require('../eslint.config.base.js');
|
|
5
|
+
|
|
6
|
+
module.exports = createConfig(
|
|
7
|
+
['src/common/tsconfig.json', 'src/browser/tsconfig.json', 'src/browser/test/tsconfig.json', 'src/node/tsconfig.json', 'src/node/test/tsconfig.json'],
|
|
8
|
+
undefined,
|
|
9
|
+
{
|
|
10
|
+
'no-console': 'error',
|
|
11
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
12
|
+
}
|
|
13
|
+
);
|
package/lib/browser/main.js
CHANGED
|
@@ -18,11 +18,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.createProtocolConnection =
|
|
21
|
+
exports.createProtocolConnection = createProtocolConnection;
|
|
22
22
|
const browser_1 = require("vscode-jsonrpc/browser");
|
|
23
23
|
__exportStar(require("vscode-jsonrpc/browser"), exports);
|
|
24
24
|
__exportStar(require("../common/api"), exports);
|
|
25
25
|
function createProtocolConnection(reader, writer, logger, options) {
|
|
26
26
|
return (0, browser_1.createMessageConnection)(reader, writer, logger, options);
|
|
27
27
|
}
|
|
28
|
-
exports.createProtocolConnection = createProtocolConnection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc';
|
|
1
|
+
import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType, RequestParam } from 'vscode-jsonrpc';
|
|
2
2
|
import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
|
|
3
3
|
export interface ProtocolConnection {
|
|
4
4
|
/**
|
|
@@ -18,8 +18,8 @@ export interface ProtocolConnection {
|
|
|
18
18
|
* @param token An optional cancellation token.
|
|
19
19
|
* @returns A promise resolving to the request's result.
|
|
20
20
|
*/
|
|
21
|
-
sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P
|
|
22
|
-
sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P
|
|
21
|
+
sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: NoInfer<RequestParam<P>>, token?: CancellationToken): Promise<R>;
|
|
22
|
+
sendRequest<P, R, E>(type: RequestType<P, R, E>, params: NoInfer<RequestParam<P>>, token?: CancellationToken): Promise<R>;
|
|
23
23
|
/**
|
|
24
24
|
* Sends a request and returns a promise resolving to the result of the request.
|
|
25
25
|
*
|
|
@@ -44,8 +44,8 @@ export interface ProtocolConnection {
|
|
|
44
44
|
* @param handler The actual handler.
|
|
45
45
|
* @returns A disposable to remove the handler.
|
|
46
46
|
*/
|
|
47
|
-
onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E
|
|
48
|
-
onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E
|
|
47
|
+
onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: NoInfer<RequestHandler0<R, E>>): Disposable;
|
|
48
|
+
onRequest<R, E>(type: RequestType0<R, E>, handler: NoInfer<RequestHandler0<R, E>>): Disposable;
|
|
49
49
|
/**
|
|
50
50
|
* Installs a request handler.
|
|
51
51
|
*
|
|
@@ -53,8 +53,8 @@ export interface ProtocolConnection {
|
|
|
53
53
|
* @param handler The actual handler.
|
|
54
54
|
* @returns A disposable to remove the handler.
|
|
55
55
|
*/
|
|
56
|
-
onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E
|
|
57
|
-
onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E
|
|
56
|
+
onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: NoInfer<RequestHandler<P, R, E>>): Disposable;
|
|
57
|
+
onRequest<P, R, E>(type: RequestType<P, R, E>, handler: NoInfer<RequestHandler<P, R, E>>): Disposable;
|
|
58
58
|
/**
|
|
59
59
|
* Installs a request handler.
|
|
60
60
|
*
|
|
@@ -85,8 +85,8 @@ export interface ProtocolConnection {
|
|
|
85
85
|
* @returns A promise that resolves when the notification is written to the
|
|
86
86
|
* network layer.
|
|
87
87
|
*/
|
|
88
|
-
sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
|
|
89
|
-
sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
|
|
88
|
+
sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: NoInfer<RequestParam<P>>): Promise<void>;
|
|
89
|
+
sendNotification<P>(type: NotificationType<P>, params?: NoInfer<RequestParam<P>>): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Sends a notification.
|
|
92
92
|
*
|
|
@@ -120,8 +120,8 @@ export interface ProtocolConnection {
|
|
|
120
120
|
* @param handler The actual handler.
|
|
121
121
|
* @returns A disposable to remove the handler.
|
|
122
122
|
*/
|
|
123
|
-
onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P
|
|
124
|
-
onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P
|
|
123
|
+
onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
124
|
+
onNotification<P>(type: NotificationType<P>, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
125
125
|
/**
|
|
126
126
|
* Installs a notification handler.
|
|
127
127
|
*
|
|
@@ -137,7 +137,7 @@ export interface ProtocolConnection {
|
|
|
137
137
|
* @param handler the handler
|
|
138
138
|
* @returns A disposable to remove the handler.
|
|
139
139
|
*/
|
|
140
|
-
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P
|
|
140
|
+
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
141
141
|
/**
|
|
142
142
|
* Sends progress.
|
|
143
143
|
* @param type the progress type
|
|
@@ -146,7 +146,7 @@ export interface ProtocolConnection {
|
|
|
146
146
|
* @returns A promise that resolves when the progress is written to the
|
|
147
147
|
* network layer.
|
|
148
148
|
*/
|
|
149
|
-
sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
|
|
149
|
+
sendProgress<P>(type: ProgressType<P>, token: string | number, value: NoInfer<RequestParam<P>>): Promise<void>;
|
|
150
150
|
/**
|
|
151
151
|
* Enables tracing mode for the connection.
|
|
152
152
|
* @returns A promise that resolves when the trace value is written to the
|
package/lib/common/connection.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.createProtocolConnection =
|
|
7
|
+
exports.createProtocolConnection = createProtocolConnection;
|
|
8
8
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
9
|
function createProtocolConnection(input, output, logger, options) {
|
|
10
10
|
if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
|
|
@@ -12,4 +12,3 @@ function createProtocolConnection(input, output, logger, options) {
|
|
|
12
12
|
}
|
|
13
13
|
return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
|
|
14
14
|
}
|
|
15
|
-
exports.createProtocolConnection = createProtocolConnection;
|
package/lib/common/messages.d.ts
CHANGED
|
@@ -49,3 +49,10 @@ export declare class ProtocolNotificationType<P, RO> extends NotificationType<P>
|
|
|
49
49
|
readonly ____: [RO, _EM] | undefined;
|
|
50
50
|
constructor(method: string);
|
|
51
51
|
}
|
|
52
|
+
export type CM<C extends string | undefined, S extends string | undefined> = {
|
|
53
|
+
client: C;
|
|
54
|
+
server: S;
|
|
55
|
+
};
|
|
56
|
+
export declare namespace CM {
|
|
57
|
+
function create<C extends string | undefined, S extends string | undefined>(client: C, server: S): CM<C, S>;
|
|
58
|
+
}
|
package/lib/common/messages.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0;
|
|
7
|
+
exports.CM = exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0;
|
|
8
8
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
9
|
var MessageDirection;
|
|
10
10
|
(function (MessageDirection) {
|
|
@@ -72,3 +72,10 @@ class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
exports.ProtocolNotificationType = ProtocolNotificationType;
|
|
75
|
+
var CM;
|
|
76
|
+
(function (CM) {
|
|
77
|
+
function create(client, server) {
|
|
78
|
+
return { client, server };
|
|
79
|
+
}
|
|
80
|
+
CM.create = create;
|
|
81
|
+
})(CM || (exports.CM = CM = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
2
|
import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types';
|
|
3
|
-
import { MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
-
import type
|
|
3
|
+
import { CM, MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
+
import { type TextDocumentRegistrationOptions, type StaticRegistrationOptions, type TextDocumentPositionParams, type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions } from './protocol';
|
|
5
5
|
/**
|
|
6
6
|
* @since 3.16.0
|
|
7
7
|
*/
|
|
@@ -45,6 +45,7 @@ export declare namespace CallHierarchyPrepareRequest {
|
|
|
45
45
|
const messageDirection: MessageDirection;
|
|
46
46
|
const type: ProtocolRequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void, CallHierarchyRegistrationOptions>;
|
|
47
47
|
type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>;
|
|
48
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* The parameter of a `callHierarchy/incomingCalls` request.
|
|
@@ -64,6 +65,7 @@ export declare namespace CallHierarchyIncomingCallsRequest {
|
|
|
64
65
|
const messageDirection: MessageDirection;
|
|
65
66
|
const type: ProtocolRequestType<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void, void>;
|
|
66
67
|
type HandlerSignature = RequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void>;
|
|
68
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* The parameter of a `callHierarchy/outgoingCalls` request.
|
|
@@ -83,4 +85,5 @@ export declare namespace CallHierarchyOutgoingCallsRequest {
|
|
|
83
85
|
const messageDirection: MessageDirection;
|
|
84
86
|
const type: ProtocolRequestType<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void, void>;
|
|
85
87
|
type HandlerSignature = RequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void>;
|
|
88
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
86
89
|
}
|
|
@@ -17,6 +17,7 @@ var CallHierarchyPrepareRequest;
|
|
|
17
17
|
CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
|
|
18
18
|
CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
19
19
|
CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
|
|
20
|
+
CallHierarchyPrepareRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
20
21
|
})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {}));
|
|
21
22
|
/**
|
|
22
23
|
* A request to resolve the incoming calls for a given `CallHierarchyItem`.
|
|
@@ -28,6 +29,7 @@ var CallHierarchyIncomingCallsRequest;
|
|
|
28
29
|
CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
|
|
29
30
|
CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
30
31
|
CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
|
|
32
|
+
CallHierarchyIncomingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
31
33
|
})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {}));
|
|
32
34
|
/**
|
|
33
35
|
* A request to resolve the outgoing calls for a given `CallHierarchyItem`.
|
|
@@ -39,4 +41,5 @@ var CallHierarchyOutgoingCallsRequest;
|
|
|
39
41
|
CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
|
|
40
42
|
CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
41
43
|
CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
|
|
44
|
+
CallHierarchyOutgoingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
42
45
|
})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
2
|
import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types';
|
|
3
|
-
import { MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
-
import type
|
|
3
|
+
import { CM, MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
+
import { type TextDocumentRegistrationOptions, type StaticRegistrationOptions, type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions } from './protocol';
|
|
5
5
|
export interface DocumentColorClientCapabilities {
|
|
6
6
|
/**
|
|
7
7
|
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
@@ -34,6 +34,7 @@ export declare namespace DocumentColorRequest {
|
|
|
34
34
|
const messageDirection: MessageDirection;
|
|
35
35
|
const type: ProtocolRequestType<DocumentColorParams, ColorInformation[], ColorInformation[], void, DocumentColorRegistrationOptions>;
|
|
36
36
|
type HandlerSignature = RequestHandler<DocumentColorParams, ColorInformation[], void>;
|
|
37
|
+
const capabilities: CM<"textDocument.colorProvider", "colorProvider">;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* Parameters for a {@link ColorPresentationRequest}.
|
|
@@ -55,7 +56,7 @@ export interface ColorPresentationParams extends WorkDoneProgressParams, Partial
|
|
|
55
56
|
/**
|
|
56
57
|
* A request to list all presentation for a color. The request's
|
|
57
58
|
* parameter is of type {@link ColorPresentationParams} the
|
|
58
|
-
* response is of type {@link
|
|
59
|
+
* response is of type {@link ColorPresentation ColorPresentation[]} or a Thenable
|
|
59
60
|
* that resolves to such.
|
|
60
61
|
*/
|
|
61
62
|
export declare namespace ColorPresentationRequest {
|
|
@@ -63,4 +64,5 @@ export declare namespace ColorPresentationRequest {
|
|
|
63
64
|
const messageDirection: MessageDirection;
|
|
64
65
|
const type: ProtocolRequestType<ColorPresentationParams, ColorPresentation[], ColorPresentation[], void, WorkDoneProgressOptions & TextDocumentRegistrationOptions>;
|
|
65
66
|
type HandlerSignature = RequestHandler<ColorPresentationParams, ColorPresentation[], void>;
|
|
67
|
+
const capabilities: CM<"textDocument.colorProvider", "colorProvider">;
|
|
66
68
|
}
|
|
@@ -17,11 +17,12 @@ var DocumentColorRequest;
|
|
|
17
17
|
DocumentColorRequest.method = 'textDocument/documentColor';
|
|
18
18
|
DocumentColorRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
19
19
|
DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
|
|
20
|
+
DocumentColorRequest.capabilities = messages_1.CM.create('textDocument.colorProvider', 'colorProvider');
|
|
20
21
|
})(DocumentColorRequest || (exports.DocumentColorRequest = DocumentColorRequest = {}));
|
|
21
22
|
/**
|
|
22
23
|
* A request to list all presentation for a color. The request's
|
|
23
24
|
* parameter is of type {@link ColorPresentationParams} the
|
|
24
|
-
* response is of type {@link
|
|
25
|
+
* response is of type {@link ColorPresentation ColorPresentation[]} or a Thenable
|
|
25
26
|
* that resolves to such.
|
|
26
27
|
*/
|
|
27
28
|
var ColorPresentationRequest;
|
|
@@ -29,4 +30,5 @@ var ColorPresentationRequest;
|
|
|
29
30
|
ColorPresentationRequest.method = 'textDocument/colorPresentation';
|
|
30
31
|
ColorPresentationRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
31
32
|
ColorPresentationRequest.type = new messages_1.ProtocolRequestType(ColorPresentationRequest.method);
|
|
33
|
+
ColorPresentationRequest.capabilities = messages_1.CM.create('textDocument.colorProvider', 'colorProvider');
|
|
32
34
|
})(ColorPresentationRequest || (exports.ColorPresentationRequest = ColorPresentationRequest = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
|
|
2
2
|
import { LSPAny, URI } from 'vscode-languageserver-types';
|
|
3
|
-
import { MessageDirection, ProtocolRequestType } from './messages';
|
|
3
|
+
import { CM, MessageDirection, ProtocolRequestType } from './messages';
|
|
4
4
|
/**
|
|
5
5
|
* The 'workspace/configuration' request is sent from the server to the client to fetch a certain
|
|
6
6
|
* configuration setting.
|
|
@@ -16,6 +16,7 @@ export declare namespace ConfigurationRequest {
|
|
|
16
16
|
const type: ProtocolRequestType<ConfigurationParams, any[], never, void, void>;
|
|
17
17
|
type HandlerSignature = RequestHandler<ConfigurationParams, LSPAny[], void>;
|
|
18
18
|
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<LSPAny[], void>;
|
|
19
|
+
const capabilities: CM<"workspace.configuration", undefined>;
|
|
19
20
|
}
|
|
20
21
|
export interface ConfigurationItem {
|
|
21
22
|
/**
|
|
@@ -21,4 +21,5 @@ var ConfigurationRequest;
|
|
|
21
21
|
ConfigurationRequest.method = 'workspace/configuration';
|
|
22
22
|
ConfigurationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
23
23
|
ConfigurationRequest.type = new messages_1.ProtocolRequestType(ConfigurationRequest.method);
|
|
24
|
+
ConfigurationRequest.capabilities = messages_1.CM.create('workspace.configuration', undefined);
|
|
24
25
|
})(ConfigurationRequest || (exports.ConfigurationRequest = ConfigurationRequest = {}));
|