@depup/vscode-languageserver-protocol 3.18.3-depup.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/License.txt +11 -0
- package/README.md +25 -0
- package/changes.json +5 -0
- package/eslint.config.js +13 -0
- package/lib/browser/main.d.ts +4 -0
- package/lib/browser/main.js +27 -0
- package/lib/common/api.d.ts +58 -0
- package/lib/common/api.js +77 -0
- package/lib/common/connection.d.ts +187 -0
- package/lib/common/connection.js +14 -0
- package/lib/common/messages.d.ts +58 -0
- package/lib/common/messages.js +81 -0
- package/lib/common/protocol.$.d.ts +1 -0
- package/lib/common/protocol.$.js +43 -0
- package/lib/common/protocol.callHierarchy.d.ts +89 -0
- package/lib/common/protocol.callHierarchy.js +45 -0
- package/lib/common/protocol.colorProvider.d.ts +68 -0
- package/lib/common/protocol.colorProvider.js +34 -0
- package/lib/common/protocol.configuration.d.ts +36 -0
- package/lib/common/protocol.configuration.js +25 -0
- package/lib/common/protocol.d.ts +3626 -0
- package/lib/common/protocol.declaration.d.ts +38 -0
- package/lib/common/protocol.declaration.js +23 -0
- package/lib/common/protocol.diagnostic.d.ts +369 -0
- package/lib/common/protocol.diagnostic.js +111 -0
- package/lib/common/protocol.fileOperations.d.ts +312 -0
- package/lib/common/protocol.fileOperations.js +107 -0
- package/lib/common/protocol.foldingRange.d.ts +118 -0
- package/lib/common/protocol.foldingRange.js +33 -0
- package/lib/common/protocol.implementation.d.ts +39 -0
- package/lib/common/protocol.implementation.js +22 -0
- package/lib/common/protocol.inlayHint.d.ts +117 -0
- package/lib/common/protocol.inlayHint.js +46 -0
- package/lib/common/protocol.inlineCompletion.d.ts +53 -0
- package/lib/common/protocol.inlineCompletion.js +22 -0
- package/lib/common/protocol.inlineValue.d.ts +88 -0
- package/lib/common/protocol.inlineValue.js +32 -0
- package/lib/common/protocol.js +1031 -0
- package/lib/common/protocol.linkedEditingRange.d.ts +53 -0
- package/lib/common/protocol.linkedEditingRange.js +20 -0
- package/lib/common/protocol.moniker.d.ts +107 -0
- package/lib/common/protocol.moniker.js +69 -0
- package/lib/common/protocol.notebook.d.ts +428 -0
- package/lib/common/protocol.notebook.js +247 -0
- package/lib/common/protocol.progress.d.ts +108 -0
- package/lib/common/protocol.progress.js +38 -0
- package/lib/common/protocol.selectionRange.d.ts +42 -0
- package/lib/common/protocol.selectionRange.js +21 -0
- package/lib/common/protocol.semanticTokens.d.ts +241 -0
- package/lib/common/protocol.semanticTokens.js +61 -0
- package/lib/common/protocol.showDocument.d.ts +73 -0
- package/lib/common/protocol.showDocument.js +23 -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 +39 -0
- package/lib/common/protocol.typeDefinition.js +22 -0
- package/lib/common/protocol.typeHierarchy.d.ts +84 -0
- package/lib/common/protocol.typeHierarchy.js +43 -0
- package/lib/common/protocol.workspaceFolder.d.ts +76 -0
- package/lib/common/protocol.workspaceFolder.js +29 -0
- package/lib/common/utils/is.d.ts +9 -0
- package/lib/common/utils/is.js +45 -0
- package/lib/node/main.d.ts +5 -0
- package/lib/node/main.js +27 -0
- package/metaModel.schema.json +864 -0
- package/package.json +68 -0
- package/thirdpartynotices.txt +31 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
|
|
2
|
+
import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, RegistrationType, CM } from './messages';
|
|
4
|
+
import { type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions, type TextDocumentRegistrationOptions, type StaticRegistrationOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export interface SemanticTokensPartialResult {
|
|
9
|
+
data: uinteger[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @since 3.16.0
|
|
13
|
+
*/
|
|
14
|
+
export interface SemanticTokensDeltaPartialResult {
|
|
15
|
+
edits: SemanticTokensEdit[];
|
|
16
|
+
}
|
|
17
|
+
export declare namespace TokenFormat {
|
|
18
|
+
const Relative: 'relative';
|
|
19
|
+
}
|
|
20
|
+
export type TokenFormat = 'relative';
|
|
21
|
+
/**
|
|
22
|
+
* @since 3.18.0
|
|
23
|
+
*/
|
|
24
|
+
export type ClientSemanticTokensRequestFullDelta = {
|
|
25
|
+
/**
|
|
26
|
+
* The client will send the `textDocument/semanticTokens/full/delta` request if
|
|
27
|
+
* the server provides a corresponding handler.
|
|
28
|
+
*/
|
|
29
|
+
delta?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @since 3.18.0
|
|
33
|
+
*/
|
|
34
|
+
export type ClientSemanticTokensRequestOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* The client will send the `textDocument/semanticTokens/range` request if
|
|
37
|
+
* the server provides a corresponding handler.
|
|
38
|
+
*/
|
|
39
|
+
range?: boolean | {};
|
|
40
|
+
/**
|
|
41
|
+
* The client will send the `textDocument/semanticTokens/full` request if
|
|
42
|
+
* the server provides a corresponding handler.
|
|
43
|
+
*/
|
|
44
|
+
full?: boolean | ClientSemanticTokensRequestFullDelta;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @since 3.16.0
|
|
48
|
+
*/
|
|
49
|
+
export interface SemanticTokensClientCapabilities {
|
|
50
|
+
/**
|
|
51
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
52
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
53
|
+
* return value for the corresponding server capability as well.
|
|
54
|
+
*/
|
|
55
|
+
dynamicRegistration?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Which requests the client supports and might send to the server
|
|
58
|
+
* depending on the server's capability. Please note that clients might not
|
|
59
|
+
* show semantic tokens or degrade some of the user experience if a range
|
|
60
|
+
* or full request is advertised by the client but not provided by the
|
|
61
|
+
* server. If for example the client capability `requests.full` and
|
|
62
|
+
* `request.range` are both set to true but the server only provides a
|
|
63
|
+
* range provider the client might not render a minimap correctly or might
|
|
64
|
+
* even decide to not show any semantic tokens at all.
|
|
65
|
+
*/
|
|
66
|
+
requests: ClientSemanticTokensRequestOptions;
|
|
67
|
+
/**
|
|
68
|
+
* The token types that the client supports.
|
|
69
|
+
*/
|
|
70
|
+
tokenTypes: string[];
|
|
71
|
+
/**
|
|
72
|
+
* The token modifiers that the client supports.
|
|
73
|
+
*/
|
|
74
|
+
tokenModifiers: string[];
|
|
75
|
+
/**
|
|
76
|
+
* The token formats the clients supports.
|
|
77
|
+
*/
|
|
78
|
+
formats: TokenFormat[];
|
|
79
|
+
/**
|
|
80
|
+
* Whether the client supports tokens that can overlap each other.
|
|
81
|
+
*/
|
|
82
|
+
overlappingTokenSupport?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the client supports tokens that can span multiple lines.
|
|
85
|
+
*/
|
|
86
|
+
multilineTokenSupport?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether the client allows the server to actively cancel a
|
|
89
|
+
* semantic token request, e.g. supports returning
|
|
90
|
+
* LSPErrorCodes.ServerCancelled. If a server does the client
|
|
91
|
+
* needs to retrigger the request.
|
|
92
|
+
*
|
|
93
|
+
* @since 3.17.0
|
|
94
|
+
*/
|
|
95
|
+
serverCancelSupport?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the client uses semantic tokens to augment existing
|
|
98
|
+
* syntax tokens. If set to `true` client side created syntax
|
|
99
|
+
* tokens and semantic tokens are both used for colorization. If
|
|
100
|
+
* set to `false` the client only uses the returned semantic tokens
|
|
101
|
+
* for colorization.
|
|
102
|
+
*
|
|
103
|
+
* If the value is `undefined` then the client behavior is not
|
|
104
|
+
* specified.
|
|
105
|
+
*
|
|
106
|
+
* @since 3.17.0
|
|
107
|
+
*/
|
|
108
|
+
augmentsSyntaxTokens?: boolean;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Semantic tokens options to support deltas for full documents
|
|
112
|
+
*
|
|
113
|
+
* @since 3.18.0
|
|
114
|
+
*/
|
|
115
|
+
export type SemanticTokensFullDelta = {
|
|
116
|
+
/**
|
|
117
|
+
* The server supports deltas for full documents.
|
|
118
|
+
*/
|
|
119
|
+
delta?: boolean;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* @since 3.16.0
|
|
123
|
+
*/
|
|
124
|
+
export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
125
|
+
/**
|
|
126
|
+
* The legend used by the server
|
|
127
|
+
*/
|
|
128
|
+
legend: SemanticTokensLegend;
|
|
129
|
+
/**
|
|
130
|
+
* Server supports providing semantic tokens for a specific range
|
|
131
|
+
* of a document.
|
|
132
|
+
*/
|
|
133
|
+
range?: boolean | {};
|
|
134
|
+
/**
|
|
135
|
+
* Server supports providing semantic tokens for a full document.
|
|
136
|
+
*/
|
|
137
|
+
full?: boolean | SemanticTokensFullDelta;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @since 3.16.0
|
|
141
|
+
*/
|
|
142
|
+
export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
|
|
143
|
+
}
|
|
144
|
+
export declare namespace SemanticTokensRegistrationType {
|
|
145
|
+
const method: 'textDocument/semanticTokens';
|
|
146
|
+
const type: RegistrationType<SemanticTokensRegistrationOptions>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @since 3.16.0
|
|
150
|
+
*/
|
|
151
|
+
export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
|
|
152
|
+
/**
|
|
153
|
+
* The text document.
|
|
154
|
+
*/
|
|
155
|
+
textDocument: TextDocumentIdentifier;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @since 3.16.0
|
|
159
|
+
*/
|
|
160
|
+
export declare namespace SemanticTokensRequest {
|
|
161
|
+
const method: 'textDocument/semanticTokens/full';
|
|
162
|
+
const messageDirection: MessageDirection;
|
|
163
|
+
const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
164
|
+
const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
|
165
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
|
|
166
|
+
const capabilities: CM<"textDocument.semanticTokens", "semanticTokensProvider">;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @since 3.16.0
|
|
170
|
+
*/
|
|
171
|
+
export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams {
|
|
172
|
+
/**
|
|
173
|
+
* The text document.
|
|
174
|
+
*/
|
|
175
|
+
textDocument: TextDocumentIdentifier;
|
|
176
|
+
/**
|
|
177
|
+
* The result id of a previous response. The result Id can either point to a full response
|
|
178
|
+
* or a delta response depending on what was received last.
|
|
179
|
+
*/
|
|
180
|
+
previousResultId: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @since 3.16.0
|
|
184
|
+
*/
|
|
185
|
+
export declare namespace SemanticTokensDeltaRequest {
|
|
186
|
+
const method: 'textDocument/semanticTokens/full/delta';
|
|
187
|
+
const messageDirection: MessageDirection;
|
|
188
|
+
const type: ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
189
|
+
const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
|
190
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
|
|
191
|
+
const capabilities: CM<"textDocument.semanticTokens.requests.full.delta", "semanticTokensProvider.full.delta">;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @since 3.16.0
|
|
195
|
+
*/
|
|
196
|
+
export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
197
|
+
/**
|
|
198
|
+
* The text document.
|
|
199
|
+
*/
|
|
200
|
+
textDocument: TextDocumentIdentifier;
|
|
201
|
+
/**
|
|
202
|
+
* The range the semantic tokens are requested for.
|
|
203
|
+
*/
|
|
204
|
+
range: Range;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @since 3.16.0
|
|
208
|
+
*/
|
|
209
|
+
export declare namespace SemanticTokensRangeRequest {
|
|
210
|
+
const method: 'textDocument/semanticTokens/range';
|
|
211
|
+
const messageDirection: MessageDirection;
|
|
212
|
+
const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
|
213
|
+
const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
|
214
|
+
type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
|
|
215
|
+
const capabilities: CM<"textDocument.semanticTokens.requests.range", "semanticTokensProvider.range">;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* @since 3.16.0
|
|
219
|
+
*/
|
|
220
|
+
export interface SemanticTokensWorkspaceClientCapabilities {
|
|
221
|
+
/**
|
|
222
|
+
* Whether the client implementation supports a refresh request sent from
|
|
223
|
+
* the server to the client.
|
|
224
|
+
*
|
|
225
|
+
* Note that this event is global and will force the client to refresh all
|
|
226
|
+
* semantic tokens currently shown. It should be used with absolute care
|
|
227
|
+
* and is useful for situation where a server for example detects a project
|
|
228
|
+
* wide change that requires such a calculation.
|
|
229
|
+
*/
|
|
230
|
+
refreshSupport?: boolean;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @since 3.16.0
|
|
234
|
+
*/
|
|
235
|
+
export declare namespace SemanticTokensRefreshRequest {
|
|
236
|
+
const method: `workspace/semanticTokens/refresh`;
|
|
237
|
+
const messageDirection: MessageDirection;
|
|
238
|
+
const type: ProtocolRequestType0<void, void, void, void>;
|
|
239
|
+
type HandlerSignature = RequestHandler0<void, void>;
|
|
240
|
+
const capabilities: CM<"workspace.semanticTokens.refreshSupport", undefined>;
|
|
241
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
//------- 'textDocument/semanticTokens' -----
|
|
10
|
+
var TokenFormat;
|
|
11
|
+
(function (TokenFormat) {
|
|
12
|
+
TokenFormat.Relative = 'relative';
|
|
13
|
+
})(TokenFormat || (exports.TokenFormat = TokenFormat = {}));
|
|
14
|
+
var SemanticTokensRegistrationType;
|
|
15
|
+
(function (SemanticTokensRegistrationType) {
|
|
16
|
+
SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';
|
|
17
|
+
SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);
|
|
18
|
+
})(SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {}));
|
|
19
|
+
/**
|
|
20
|
+
* @since 3.16.0
|
|
21
|
+
*/
|
|
22
|
+
var SemanticTokensRequest;
|
|
23
|
+
(function (SemanticTokensRequest) {
|
|
24
|
+
SemanticTokensRequest.method = 'textDocument/semanticTokens/full';
|
|
25
|
+
SemanticTokensRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
26
|
+
SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
|
|
27
|
+
SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method;
|
|
28
|
+
SemanticTokensRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens', 'semanticTokensProvider');
|
|
29
|
+
})(SemanticTokensRequest || (exports.SemanticTokensRequest = SemanticTokensRequest = {}));
|
|
30
|
+
/**
|
|
31
|
+
* @since 3.16.0
|
|
32
|
+
*/
|
|
33
|
+
var SemanticTokensDeltaRequest;
|
|
34
|
+
(function (SemanticTokensDeltaRequest) {
|
|
35
|
+
SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';
|
|
36
|
+
SemanticTokensDeltaRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
37
|
+
SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
|
|
38
|
+
SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method;
|
|
39
|
+
SemanticTokensDeltaRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens.requests.full.delta', 'semanticTokensProvider.full.delta');
|
|
40
|
+
})(SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {}));
|
|
41
|
+
/**
|
|
42
|
+
* @since 3.16.0
|
|
43
|
+
*/
|
|
44
|
+
var SemanticTokensRangeRequest;
|
|
45
|
+
(function (SemanticTokensRangeRequest) {
|
|
46
|
+
SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
|
|
47
|
+
SemanticTokensRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
48
|
+
SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
|
|
49
|
+
SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method;
|
|
50
|
+
SemanticTokensRangeRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens.requests.range', 'semanticTokensProvider.range');
|
|
51
|
+
})(SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {}));
|
|
52
|
+
/**
|
|
53
|
+
* @since 3.16.0
|
|
54
|
+
*/
|
|
55
|
+
var SemanticTokensRefreshRequest;
|
|
56
|
+
(function (SemanticTokensRefreshRequest) {
|
|
57
|
+
SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;
|
|
58
|
+
SemanticTokensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
59
|
+
SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method);
|
|
60
|
+
SemanticTokensRefreshRequest.capabilities = messages_1.CM.create('workspace.semanticTokens.refreshSupport', undefined);
|
|
61
|
+
})(SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {}));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CancellationToken, HandlerResult, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Range, URI } from 'vscode-languageserver-types';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType, CM } from './messages';
|
|
4
|
+
/**
|
|
5
|
+
* Client capabilities for the showDocument request.
|
|
6
|
+
*
|
|
7
|
+
* @since 3.16.0
|
|
8
|
+
*/
|
|
9
|
+
export interface ShowDocumentClientCapabilities {
|
|
10
|
+
/**
|
|
11
|
+
* The client has support for the showDocument
|
|
12
|
+
* request.
|
|
13
|
+
*/
|
|
14
|
+
support: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Params to show a resource in the UI.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.16.0
|
|
20
|
+
*/
|
|
21
|
+
export interface ShowDocumentParams {
|
|
22
|
+
/**
|
|
23
|
+
* The uri to show.
|
|
24
|
+
*/
|
|
25
|
+
uri: URI;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates to show the resource in an external program.
|
|
28
|
+
* To show, for example, `https://code.visualstudio.com/`
|
|
29
|
+
* in the default WEB browser set `external` to `true`.
|
|
30
|
+
*/
|
|
31
|
+
external?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* An optional property to indicate whether the editor
|
|
34
|
+
* showing the document should take focus or not.
|
|
35
|
+
* Clients might ignore this property if an external
|
|
36
|
+
* program is started.
|
|
37
|
+
*/
|
|
38
|
+
takeFocus?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* An optional selection range if the document is a text
|
|
41
|
+
* document. Clients might ignore the property if an
|
|
42
|
+
* external program is started or the file is not a text
|
|
43
|
+
* file.
|
|
44
|
+
*/
|
|
45
|
+
selection?: Range;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The result of a showDocument request.
|
|
49
|
+
*
|
|
50
|
+
* @since 3.16.0
|
|
51
|
+
*/
|
|
52
|
+
export interface ShowDocumentResult {
|
|
53
|
+
/**
|
|
54
|
+
* A boolean indicating if the show was successful.
|
|
55
|
+
*/
|
|
56
|
+
success: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A request to show a document. This request might open an
|
|
60
|
+
* external program depending on the value of the URI to open.
|
|
61
|
+
* For example a request to open `https://code.visualstudio.com/`
|
|
62
|
+
* will very likely open the URI in a WEB browser.
|
|
63
|
+
*
|
|
64
|
+
* @since 3.16.0
|
|
65
|
+
*/
|
|
66
|
+
export declare namespace ShowDocumentRequest {
|
|
67
|
+
const method: 'window/showDocument';
|
|
68
|
+
const messageDirection: MessageDirection;
|
|
69
|
+
const type: ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>;
|
|
70
|
+
type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
|
|
71
|
+
type MiddlewareSignature = (params: ShowDocumentParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
|
|
72
|
+
const capabilities: CM<"window.showDocument.support", undefined>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ShowDocumentRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to show a document. This request might open an
|
|
11
|
+
* external program depending on the value of the URI to open.
|
|
12
|
+
* For example a request to open `https://code.visualstudio.com/`
|
|
13
|
+
* will very likely open the URI in a WEB browser.
|
|
14
|
+
*
|
|
15
|
+
* @since 3.16.0
|
|
16
|
+
*/
|
|
17
|
+
var ShowDocumentRequest;
|
|
18
|
+
(function (ShowDocumentRequest) {
|
|
19
|
+
ShowDocumentRequest.method = 'window/showDocument';
|
|
20
|
+
ShowDocumentRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
21
|
+
ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);
|
|
22
|
+
ShowDocumentRequest.capabilities = messages_1.CM.create('window.showDocument.support', undefined);
|
|
23
|
+
})(ShowDocumentRequest || (exports.ShowDocumentRequest = ShowDocumentRequest = {}));
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { DocumentUri } from 'vscode-languageserver-types';
|
|
2
|
+
import type { RequestHandler } from 'vscode-jsonrpc';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType, CM } from './messages';
|
|
4
|
+
import { type StaticRegistrationOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Client capabilities for a text document content provider.
|
|
7
|
+
*
|
|
8
|
+
* @since 3.18.0
|
|
9
|
+
*/
|
|
10
|
+
export type TextDocumentContentClientCapabilities = {
|
|
11
|
+
/**
|
|
12
|
+
* Text document content provider supports dynamic registration.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Text document content provider options.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.18.0
|
|
20
|
+
*/
|
|
21
|
+
export type TextDocumentContentOptions = {
|
|
22
|
+
/**
|
|
23
|
+
* The schemes for which the server provides content.
|
|
24
|
+
*/
|
|
25
|
+
schemes: string[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Text document content provider registration options.
|
|
29
|
+
*
|
|
30
|
+
* @since 3.18.0
|
|
31
|
+
*/
|
|
32
|
+
export type TextDocumentContentRegistrationOptions = TextDocumentContentOptions & StaticRegistrationOptions;
|
|
33
|
+
/**
|
|
34
|
+
* Parameters for the `workspace/textDocumentContent` request.
|
|
35
|
+
*
|
|
36
|
+
* @since 3.18.0
|
|
37
|
+
*/
|
|
38
|
+
export interface TextDocumentContentParams {
|
|
39
|
+
/**
|
|
40
|
+
* The uri of the text document.
|
|
41
|
+
*/
|
|
42
|
+
uri: DocumentUri;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Result of the `workspace/textDocumentContent` request.
|
|
46
|
+
*
|
|
47
|
+
* @since 3.18.0
|
|
48
|
+
*/
|
|
49
|
+
export interface TextDocumentContentResult {
|
|
50
|
+
/**
|
|
51
|
+
* The text content of the text document. Please note, that the content of
|
|
52
|
+
* any subsequent open notifications for the text document might differ
|
|
53
|
+
* from the returned content due to whitespace and line ending
|
|
54
|
+
* normalizations done on the client
|
|
55
|
+
*/
|
|
56
|
+
text: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The `workspace/textDocumentContent` request is sent from the client to the
|
|
60
|
+
* server to request the content of a text document.
|
|
61
|
+
*
|
|
62
|
+
* @since 3.18.0
|
|
63
|
+
*/
|
|
64
|
+
export declare namespace TextDocumentContentRequest {
|
|
65
|
+
const method: 'workspace/textDocumentContent';
|
|
66
|
+
const messageDirection: MessageDirection;
|
|
67
|
+
const type: ProtocolRequestType<TextDocumentContentParams, TextDocumentContentResult, void, void, TextDocumentContentRegistrationOptions>;
|
|
68
|
+
type HandlerSignature = RequestHandler<TextDocumentContentParams, TextDocumentContentResult, void>;
|
|
69
|
+
const capabilities: CM<"workspace.textDocumentContent", "workspace.textDocumentContent">;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Parameters for the `workspace/textDocumentContent/refresh` request.
|
|
73
|
+
*
|
|
74
|
+
* @since 3.18.0
|
|
75
|
+
*/
|
|
76
|
+
export interface TextDocumentContentRefreshParams {
|
|
77
|
+
/**
|
|
78
|
+
* The uri of the text document to refresh.
|
|
79
|
+
*/
|
|
80
|
+
uri: DocumentUri;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The `workspace/textDocumentContent` request is sent from the server to the client to refresh
|
|
84
|
+
* the content of a specific text document.
|
|
85
|
+
*
|
|
86
|
+
* @since 3.18.0
|
|
87
|
+
*/
|
|
88
|
+
export declare namespace TextDocumentContentRefreshRequest {
|
|
89
|
+
const method: `workspace/textDocumentContent/refresh`;
|
|
90
|
+
const messageDirection: MessageDirection;
|
|
91
|
+
const type: ProtocolRequestType<TextDocumentContentRefreshParams, void, void, void, void>;
|
|
92
|
+
type HandlerSignature = RequestHandler<TextDocumentContentRefreshParams, void, void>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* The `workspace/textDocumentContent` request is sent from the client to the
|
|
11
|
+
* server to request the content of a text document.
|
|
12
|
+
*
|
|
13
|
+
* @since 3.18.0
|
|
14
|
+
*/
|
|
15
|
+
var TextDocumentContentRequest;
|
|
16
|
+
(function (TextDocumentContentRequest) {
|
|
17
|
+
TextDocumentContentRequest.method = 'workspace/textDocumentContent';
|
|
18
|
+
TextDocumentContentRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
19
|
+
TextDocumentContentRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRequest.method);
|
|
20
|
+
TextDocumentContentRequest.capabilities = messages_1.CM.create('workspace.textDocumentContent', 'workspace.textDocumentContent');
|
|
21
|
+
})(TextDocumentContentRequest || (exports.TextDocumentContentRequest = TextDocumentContentRequest = {}));
|
|
22
|
+
/**
|
|
23
|
+
* The `workspace/textDocumentContent` request is sent from the server to the client to refresh
|
|
24
|
+
* the content of a specific text document.
|
|
25
|
+
*
|
|
26
|
+
* @since 3.18.0
|
|
27
|
+
*/
|
|
28
|
+
var TextDocumentContentRefreshRequest;
|
|
29
|
+
(function (TextDocumentContentRefreshRequest) {
|
|
30
|
+
TextDocumentContentRefreshRequest.method = `workspace/textDocumentContent/refresh`;
|
|
31
|
+
TextDocumentContentRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
32
|
+
TextDocumentContentRefreshRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRefreshRequest.method);
|
|
33
|
+
})(TextDocumentContentRefreshRequest || (exports.TextDocumentContentRefreshRequest = TextDocumentContentRefreshRequest = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType, CM } from './messages';
|
|
4
|
+
import { type TextDocumentRegistrationOptions, type StaticRegistrationOptions, type TextDocumentPositionParams, type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Since 3.6.0
|
|
7
|
+
*/
|
|
8
|
+
export interface TypeDefinitionClientCapabilities {
|
|
9
|
+
/**
|
|
10
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
11
|
+
* the client supports the new `TypeDefinitionRegistrationOptions` return value
|
|
12
|
+
* for the corresponding server capability as well.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The client supports additional metadata in the form of definition links.
|
|
17
|
+
*
|
|
18
|
+
* Since 3.14.0
|
|
19
|
+
*/
|
|
20
|
+
linkSupport?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
|
|
23
|
+
}
|
|
24
|
+
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
|
|
25
|
+
}
|
|
26
|
+
export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
30
|
+
* document position. The request's parameter is of type {@link TextDocumentPositionParams}
|
|
31
|
+
* the response is of type {@link Definition} or a Thenable that resolves to such.
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace TypeDefinitionRequest {
|
|
34
|
+
const method: 'textDocument/typeDefinition';
|
|
35
|
+
const messageDirection: MessageDirection;
|
|
36
|
+
const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
|
|
37
|
+
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
|
|
38
|
+
const capabilities: CM<"textDocument.typeDefinition", "typeDefinitionProvider">;
|
|
39
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TypeDefinitionRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
// @ts-ignore: to avoid inlining LocationLink as dynamic import
|
|
10
|
+
let __noDynamicImport;
|
|
11
|
+
/**
|
|
12
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
13
|
+
* document position. The request's parameter is of type {@link TextDocumentPositionParams}
|
|
14
|
+
* the response is of type {@link Definition} or a Thenable that resolves to such.
|
|
15
|
+
*/
|
|
16
|
+
var TypeDefinitionRequest;
|
|
17
|
+
(function (TypeDefinitionRequest) {
|
|
18
|
+
TypeDefinitionRequest.method = 'textDocument/typeDefinition';
|
|
19
|
+
TypeDefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
20
|
+
TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
|
|
21
|
+
TypeDefinitionRequest.capabilities = messages_1.CM.create('textDocument.typeDefinition', 'typeDefinitionProvider');
|
|
22
|
+
})(TypeDefinitionRequest || (exports.TypeDefinitionRequest = TypeDefinitionRequest = {}));
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { TypeHierarchyItem } from 'vscode-languageserver-types';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType, CM } from './messages';
|
|
4
|
+
import { type TextDocumentRegistrationOptions, type StaticRegistrationOptions, type TextDocumentPositionParams, type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.17.0
|
|
7
|
+
*/
|
|
8
|
+
export type TypeHierarchyClientCapabilities = {
|
|
9
|
+
/**
|
|
10
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
11
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
12
|
+
* return value for the corresponding server capability as well.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Type hierarchy options used during static registration.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.17.0
|
|
20
|
+
*/
|
|
21
|
+
export type TypeHierarchyOptions = WorkDoneProgressOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Type hierarchy options used during static or dynamic registration.
|
|
24
|
+
*
|
|
25
|
+
* @since 3.17.0
|
|
26
|
+
*/
|
|
27
|
+
export type TypeHierarchyRegistrationOptions = TextDocumentRegistrationOptions & TypeHierarchyOptions & StaticRegistrationOptions;
|
|
28
|
+
/**
|
|
29
|
+
* The parameter of a `textDocument/prepareTypeHierarchy` request.
|
|
30
|
+
*
|
|
31
|
+
* @since 3.17.0
|
|
32
|
+
*/
|
|
33
|
+
export type TypeHierarchyPrepareParams = TextDocumentPositionParams & WorkDoneProgressParams;
|
|
34
|
+
/**
|
|
35
|
+
* A request to result a `TypeHierarchyItem` in a document at a given position.
|
|
36
|
+
* Can be used as an input to a subtypes or supertypes type hierarchy.
|
|
37
|
+
*
|
|
38
|
+
* @since 3.17.0
|
|
39
|
+
*/
|
|
40
|
+
export declare namespace TypeHierarchyPrepareRequest {
|
|
41
|
+
const method: 'textDocument/prepareTypeHierarchy';
|
|
42
|
+
const messageDirection: MessageDirection;
|
|
43
|
+
const type: ProtocolRequestType<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, never, void, TypeHierarchyRegistrationOptions>;
|
|
44
|
+
type HandlerSignature = RequestHandler<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, void>;
|
|
45
|
+
const capabilities: CM<"textDocument.typeHierarchy", "typeHierarchyProvider">;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The parameter of a `typeHierarchy/supertypes` request.
|
|
49
|
+
*
|
|
50
|
+
* @since 3.17.0
|
|
51
|
+
*/
|
|
52
|
+
export type TypeHierarchySupertypesParams = WorkDoneProgressParams & PartialResultParams & {
|
|
53
|
+
item: TypeHierarchyItem;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A request to resolve the supertypes for a given `TypeHierarchyItem`.
|
|
57
|
+
*
|
|
58
|
+
* @since 3.17.0
|
|
59
|
+
*/
|
|
60
|
+
export declare namespace TypeHierarchySupertypesRequest {
|
|
61
|
+
const method: 'typeHierarchy/supertypes';
|
|
62
|
+
const messageDirection: MessageDirection;
|
|
63
|
+
const type: ProtocolRequestType<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
|
|
64
|
+
type HandlerSignature = RequestHandler<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, void>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The parameter of a `typeHierarchy/subtypes` request.
|
|
68
|
+
*
|
|
69
|
+
* @since 3.17.0
|
|
70
|
+
*/
|
|
71
|
+
export type TypeHierarchySubtypesParams = WorkDoneProgressParams & PartialResultParams & {
|
|
72
|
+
item: TypeHierarchyItem;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* A request to resolve the subtypes for a given `TypeHierarchyItem`.
|
|
76
|
+
*
|
|
77
|
+
* @since 3.17.0
|
|
78
|
+
*/
|
|
79
|
+
export declare namespace TypeHierarchySubtypesRequest {
|
|
80
|
+
const method: 'typeHierarchy/subtypes';
|
|
81
|
+
const messageDirection: MessageDirection;
|
|
82
|
+
const type: ProtocolRequestType<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void, void>;
|
|
83
|
+
type HandlerSignature = RequestHandler<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, void>;
|
|
84
|
+
}
|