vscode-languageserver-protocol 3.15.0-next.8 → 3.15.2
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/.eslintignore +1 -0
- package/lib/main.d.ts +53 -31
- package/lib/main.js +34 -23
- package/lib/messages.d.ts +15 -0
- package/lib/messages.js +31 -0
- package/lib/protocol.callHierarchy.proposed.d.ts +133 -70
- package/lib/protocol.callHierarchy.proposed.js +26 -22
- package/lib/protocol.colorProvider.d.ts +13 -26
- package/lib/protocol.colorProvider.js +5 -2
- package/lib/protocol.configuration.d.ts +3 -2
- package/lib/protocol.configuration.js +2 -2
- package/lib/protocol.d.ts +979 -605
- package/lib/protocol.declaration.d.ts +18 -28
- package/lib/protocol.declaration.js +4 -1
- package/lib/protocol.foldingRange.d.ts +20 -33
- package/lib/protocol.foldingRange.js +4 -1
- package/lib/protocol.implementation.d.ts +20 -28
- package/lib/protocol.implementation.js +4 -1
- package/lib/protocol.js +160 -89
- package/lib/{protocol.progress.proposed.d.ts → protocol.progress.d.ts} +11 -7
- package/lib/{protocol.progress.proposed.js → protocol.progress.js} +3 -2
- package/lib/protocol.selectionRange.d.ts +10 -23
- package/lib/protocol.selectionRange.js +4 -1
- package/lib/protocol.sematicTokens.proposed.d.ts +240 -0
- package/lib/protocol.sematicTokens.proposed.js +93 -0
- package/lib/protocol.typeDefinition.d.ts +20 -28
- package/lib/protocol.typeDefinition.js +4 -1
- package/lib/protocol.workspaceFolders.d.ts +5 -4
- package/lib/protocol.workspaceFolders.js +3 -3
- package/lib/utils/is.d.ts +0 -1
- package/lib/utils/is.js +0 -4
- package/package.json +5 -5
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
const messages_1 = require("./messages");
|
|
8
9
|
/**
|
|
9
10
|
* A request to provide selection ranges in a document. The request's
|
|
10
11
|
* parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
|
|
@@ -13,6 +14,8 @@ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
|
13
14
|
*/
|
|
14
15
|
var SelectionRangeRequest;
|
|
15
16
|
(function (SelectionRangeRequest) {
|
|
16
|
-
SelectionRangeRequest.
|
|
17
|
+
SelectionRangeRequest.method = 'textDocument/selectionRange';
|
|
18
|
+
SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
|
|
19
|
+
/** @deprecated Use SelectionRangeRequest.type */
|
|
17
20
|
SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
|
|
18
21
|
})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { TextDocumentIdentifier, Range } from 'vscode-languageserver-types';
|
|
2
|
+
import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
/**
|
|
5
|
+
* A set of predefined token types. This set is not fixed
|
|
6
|
+
* an clients can specify additional token types via the
|
|
7
|
+
* corresponding client capabilities.
|
|
8
|
+
*
|
|
9
|
+
* @since 3.16.0 - Proposed state
|
|
10
|
+
*/
|
|
11
|
+
export declare enum SemanticTokenTypes {
|
|
12
|
+
comment = "comment",
|
|
13
|
+
keyword = "keyword",
|
|
14
|
+
string = "string",
|
|
15
|
+
number = "number",
|
|
16
|
+
regexp = "regexp",
|
|
17
|
+
operator = "operator",
|
|
18
|
+
namespace = "namespace",
|
|
19
|
+
type = "type",
|
|
20
|
+
struct = "struct",
|
|
21
|
+
class = "class",
|
|
22
|
+
interface = "interface",
|
|
23
|
+
enum = "enum",
|
|
24
|
+
typeParameter = "typeParameter",
|
|
25
|
+
function = "function",
|
|
26
|
+
member = "member",
|
|
27
|
+
property = "property",
|
|
28
|
+
marco = "marco",
|
|
29
|
+
variable = "variable",
|
|
30
|
+
parameter = "parameter",
|
|
31
|
+
label = "label"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A set of predefined token modifiers. This set is not fixed
|
|
35
|
+
* an clients can specify additional token types via the
|
|
36
|
+
* corresponding client capabilities.
|
|
37
|
+
*
|
|
38
|
+
* @since 3.16.0 - Proposed state
|
|
39
|
+
*/
|
|
40
|
+
export declare enum SemanticTokenModifiers {
|
|
41
|
+
documentation = "documentation",
|
|
42
|
+
declaration = "declaration",
|
|
43
|
+
definition = "definition",
|
|
44
|
+
reference = "reference",
|
|
45
|
+
static = "static",
|
|
46
|
+
abstract = "abstract",
|
|
47
|
+
deprecated = "deprected",
|
|
48
|
+
async = "async",
|
|
49
|
+
volatile = "volatile",
|
|
50
|
+
final = "final"
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @since 3.16.0 - Proposed state
|
|
54
|
+
*/
|
|
55
|
+
export interface SemanticTokensLegend {
|
|
56
|
+
/**
|
|
57
|
+
* The token types a server uses.
|
|
58
|
+
*/
|
|
59
|
+
tokenTypes: string[];
|
|
60
|
+
/**
|
|
61
|
+
* The token modifiers a server uses.
|
|
62
|
+
*/
|
|
63
|
+
tokenModifiers: string[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @since 3.16.0 - Proposed state
|
|
67
|
+
*/
|
|
68
|
+
export interface SemanticTokens {
|
|
69
|
+
/**
|
|
70
|
+
* An optional result id. If provided and clients support delta updating
|
|
71
|
+
* the client will include the result id in the next semantic token request.
|
|
72
|
+
* A server can then instead of computing all sematic tokens again simply
|
|
73
|
+
* send a delta.
|
|
74
|
+
*/
|
|
75
|
+
resultId?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The actual tokens. For a detailed description about how the data is
|
|
78
|
+
* structured pls see
|
|
79
|
+
* https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71
|
|
80
|
+
*/
|
|
81
|
+
data: number[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @since 3.16.0 - Proposed state
|
|
85
|
+
*/
|
|
86
|
+
export declare namespace SemanticTokens {
|
|
87
|
+
function is(value: any): value is SemanticTokens;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @since 3.16.0 - Proposed state
|
|
91
|
+
*/
|
|
92
|
+
export interface SemanticTokensPartialResult {
|
|
93
|
+
data: number[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @since 3.16.0 - Proposed state
|
|
97
|
+
*/
|
|
98
|
+
export interface SemanticTokensEdit {
|
|
99
|
+
start: number;
|
|
100
|
+
deleteCount: number;
|
|
101
|
+
data?: number[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @since 3.16.0 - Proposed state
|
|
105
|
+
*/
|
|
106
|
+
export interface SemanticTokensEdits {
|
|
107
|
+
readonly resultId?: string;
|
|
108
|
+
/**
|
|
109
|
+
* For a detailed description how these edits are structured pls see
|
|
110
|
+
* https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L131
|
|
111
|
+
*/
|
|
112
|
+
edits: SemanticTokensEdit[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @since 3.16.0 - Proposed state
|
|
116
|
+
*/
|
|
117
|
+
export interface SemanticTokensEditsPartialResult {
|
|
118
|
+
edits: SemanticTokensEdit[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @since 3.16.0 - Proposed state
|
|
122
|
+
*/
|
|
123
|
+
export interface SemanticTokensClientCapabilities {
|
|
124
|
+
/**
|
|
125
|
+
* The text document client capabilities
|
|
126
|
+
*/
|
|
127
|
+
textDocument?: {
|
|
128
|
+
/**
|
|
129
|
+
* Capabilities specific to the `textDocument/semanticTokens`
|
|
130
|
+
*
|
|
131
|
+
* @since 3.16.0 - Proposed state
|
|
132
|
+
*/
|
|
133
|
+
semanticTokens?: {
|
|
134
|
+
/**
|
|
135
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
136
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
137
|
+
* return value for the corresponding server capability as well.
|
|
138
|
+
*/
|
|
139
|
+
dynamicRegistration?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* The token types know by the client.
|
|
142
|
+
*/
|
|
143
|
+
tokenTypes: string[];
|
|
144
|
+
/**
|
|
145
|
+
* The token modifiers know by the client.
|
|
146
|
+
*/
|
|
147
|
+
tokenModifiers: string[];
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @since 3.16.0 - Proposed state
|
|
153
|
+
*/
|
|
154
|
+
export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
155
|
+
/**
|
|
156
|
+
* The legend used by the server
|
|
157
|
+
*/
|
|
158
|
+
legend: SemanticTokensLegend;
|
|
159
|
+
/**
|
|
160
|
+
* Server supports providing semantic tokens for a sepcific range
|
|
161
|
+
* of a document.
|
|
162
|
+
*/
|
|
163
|
+
rangeProvider?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Server supports providing semantic tokens for a full document.
|
|
166
|
+
*/
|
|
167
|
+
documentProvider?: boolean | {
|
|
168
|
+
/**
|
|
169
|
+
* The server supports deltas for full documents.
|
|
170
|
+
*/
|
|
171
|
+
edits?: boolean;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @since 3.16.0 - Proposed state
|
|
176
|
+
*/
|
|
177
|
+
export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @since 3.16.0 - Proposed state
|
|
181
|
+
*/
|
|
182
|
+
export interface SemanticTokensServerCapabilities {
|
|
183
|
+
semanticTokensProvider: SemanticTokensOptions | SemanticTokensRegistrationOptions;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @since 3.16.0 - Proposed state
|
|
187
|
+
*/
|
|
188
|
+
export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
|
|
189
|
+
/**
|
|
190
|
+
* The text document.
|
|
191
|
+
*/
|
|
192
|
+
textDocument: TextDocumentIdentifier;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @since 3.16.0 - Proposed state
|
|
196
|
+
*/
|
|
197
|
+
export declare namespace SemanticTokensRequest {
|
|
198
|
+
const method: 'textDocument/semanticTokens';
|
|
199
|
+
const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @since 3.16.0 - Proposed state
|
|
203
|
+
*/
|
|
204
|
+
export interface SemanticTokensEditsParams extends WorkDoneProgressParams, PartialResultParams {
|
|
205
|
+
/**
|
|
206
|
+
* The text document.
|
|
207
|
+
*/
|
|
208
|
+
textDocument: TextDocumentIdentifier;
|
|
209
|
+
/**
|
|
210
|
+
* The previous result id.
|
|
211
|
+
*/
|
|
212
|
+
previousResultId: string;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* @since 3.16.0 - Proposed state
|
|
216
|
+
*/
|
|
217
|
+
export declare namespace SemanticTokensEditsRequest {
|
|
218
|
+
const method: 'textDocument/semanticTokens/edits';
|
|
219
|
+
const type: ProtocolRequestType<SemanticTokensEditsParams, SemanticTokens | SemanticTokensEdits | null, SemanticTokensPartialResult | SemanticTokensEditsPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @since 3.16.0 - Proposed state
|
|
223
|
+
*/
|
|
224
|
+
export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
225
|
+
/**
|
|
226
|
+
* The text document.
|
|
227
|
+
*/
|
|
228
|
+
textDocument: TextDocumentIdentifier;
|
|
229
|
+
/**
|
|
230
|
+
* The range the semantic tokens are requested for.
|
|
231
|
+
*/
|
|
232
|
+
range: Range;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* @since 3.16.0 - Proposed state
|
|
236
|
+
*/
|
|
237
|
+
export declare namespace SemanticTokensRangeRequest {
|
|
238
|
+
const method: 'textDocument/semanticTokens/range';
|
|
239
|
+
const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
|
240
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const messages_1 = require("./messages");
|
|
8
|
+
/**
|
|
9
|
+
* A set of predefined token types. This set is not fixed
|
|
10
|
+
* an clients can specify additional token types via the
|
|
11
|
+
* corresponding client capabilities.
|
|
12
|
+
*
|
|
13
|
+
* @since 3.16.0 - Proposed state
|
|
14
|
+
*/
|
|
15
|
+
var SemanticTokenTypes;
|
|
16
|
+
(function (SemanticTokenTypes) {
|
|
17
|
+
SemanticTokenTypes["comment"] = "comment";
|
|
18
|
+
SemanticTokenTypes["keyword"] = "keyword";
|
|
19
|
+
SemanticTokenTypes["string"] = "string";
|
|
20
|
+
SemanticTokenTypes["number"] = "number";
|
|
21
|
+
SemanticTokenTypes["regexp"] = "regexp";
|
|
22
|
+
SemanticTokenTypes["operator"] = "operator";
|
|
23
|
+
SemanticTokenTypes["namespace"] = "namespace";
|
|
24
|
+
SemanticTokenTypes["type"] = "type";
|
|
25
|
+
SemanticTokenTypes["struct"] = "struct";
|
|
26
|
+
SemanticTokenTypes["class"] = "class";
|
|
27
|
+
SemanticTokenTypes["interface"] = "interface";
|
|
28
|
+
SemanticTokenTypes["enum"] = "enum";
|
|
29
|
+
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
30
|
+
SemanticTokenTypes["function"] = "function";
|
|
31
|
+
SemanticTokenTypes["member"] = "member";
|
|
32
|
+
SemanticTokenTypes["property"] = "property";
|
|
33
|
+
SemanticTokenTypes["marco"] = "marco";
|
|
34
|
+
SemanticTokenTypes["variable"] = "variable";
|
|
35
|
+
SemanticTokenTypes["parameter"] = "parameter";
|
|
36
|
+
SemanticTokenTypes["label"] = "label";
|
|
37
|
+
})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
|
|
38
|
+
/**
|
|
39
|
+
* A set of predefined token modifiers. This set is not fixed
|
|
40
|
+
* an clients can specify additional token types via the
|
|
41
|
+
* corresponding client capabilities.
|
|
42
|
+
*
|
|
43
|
+
* @since 3.16.0 - Proposed state
|
|
44
|
+
*/
|
|
45
|
+
var SemanticTokenModifiers;
|
|
46
|
+
(function (SemanticTokenModifiers) {
|
|
47
|
+
SemanticTokenModifiers["documentation"] = "documentation";
|
|
48
|
+
SemanticTokenModifiers["declaration"] = "declaration";
|
|
49
|
+
SemanticTokenModifiers["definition"] = "definition";
|
|
50
|
+
SemanticTokenModifiers["reference"] = "reference";
|
|
51
|
+
SemanticTokenModifiers["static"] = "static";
|
|
52
|
+
SemanticTokenModifiers["abstract"] = "abstract";
|
|
53
|
+
SemanticTokenModifiers["deprecated"] = "deprected";
|
|
54
|
+
SemanticTokenModifiers["async"] = "async";
|
|
55
|
+
SemanticTokenModifiers["volatile"] = "volatile";
|
|
56
|
+
SemanticTokenModifiers["final"] = "final";
|
|
57
|
+
})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
|
|
58
|
+
/**
|
|
59
|
+
* @since 3.16.0 - Proposed state
|
|
60
|
+
*/
|
|
61
|
+
var SemanticTokens;
|
|
62
|
+
(function (SemanticTokens) {
|
|
63
|
+
function is(value) {
|
|
64
|
+
const candidate = value;
|
|
65
|
+
return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
66
|
+
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
67
|
+
}
|
|
68
|
+
SemanticTokens.is = is;
|
|
69
|
+
})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
|
|
70
|
+
/**
|
|
71
|
+
* @since 3.16.0 - Proposed state
|
|
72
|
+
*/
|
|
73
|
+
var SemanticTokensRequest;
|
|
74
|
+
(function (SemanticTokensRequest) {
|
|
75
|
+
SemanticTokensRequest.method = 'textDocument/semanticTokens';
|
|
76
|
+
SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
|
|
77
|
+
})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
|
|
78
|
+
/**
|
|
79
|
+
* @since 3.16.0 - Proposed state
|
|
80
|
+
*/
|
|
81
|
+
var SemanticTokensEditsRequest;
|
|
82
|
+
(function (SemanticTokensEditsRequest) {
|
|
83
|
+
SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
|
|
84
|
+
SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
|
|
85
|
+
})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
|
|
86
|
+
/**
|
|
87
|
+
* @since 3.16.0 - Proposed state
|
|
88
|
+
*/
|
|
89
|
+
var SemanticTokensRangeRequest;
|
|
90
|
+
(function (SemanticTokensRangeRequest) {
|
|
91
|
+
SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
|
|
92
|
+
SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
|
|
93
|
+
})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
|
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
|
|
2
2
|
import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
3
4
|
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Since 3.6.0
|
|
7
|
+
*/
|
|
4
8
|
export interface TypeDefinitionClientCapabilities {
|
|
5
9
|
/**
|
|
6
|
-
*
|
|
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
|
|
7
19
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Capabilities specific to the `textDocument/typeDefinition`
|
|
11
|
-
*/
|
|
12
|
-
typeDefinition?: {
|
|
13
|
-
/**
|
|
14
|
-
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
15
|
-
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
16
|
-
* return value for the corresponding server capability as well.
|
|
17
|
-
*/
|
|
18
|
-
dynamicRegistration?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The client supports additional metadata in the form of definition links.
|
|
21
|
-
*/
|
|
22
|
-
linkSupport?: boolean;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
20
|
+
linkSupport?: boolean;
|
|
25
21
|
}
|
|
26
22
|
export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
|
|
27
23
|
}
|
|
28
|
-
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions {
|
|
29
|
-
}
|
|
30
|
-
export interface TypeDefinitionServerCapabilities {
|
|
31
|
-
/**
|
|
32
|
-
* The server provides Goto Type Definition support.
|
|
33
|
-
*/
|
|
34
|
-
typeDefinitionProvider?: boolean | TypeDefinitionOptions | (TypeDefinitionRegistrationOptions & StaticRegistrationOptions);
|
|
24
|
+
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
|
|
35
25
|
}
|
|
36
26
|
export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
37
27
|
}
|
|
@@ -42,7 +32,9 @@ export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDo
|
|
|
42
32
|
* Thenable that resolves to such.
|
|
43
33
|
*/
|
|
44
34
|
export declare namespace TypeDefinitionRequest {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
35
|
+
const method: 'textDocument/typeDefinition';
|
|
36
|
+
const type: ProtocolRequestType<TypeDefinitionParams, Location | Location[] | LocationLink[] | null, LocationLink[] | Location[], void, TypeDefinitionRegistrationOptions>;
|
|
37
|
+
/** @deprecated Use TypeDefinitionRequest.type */
|
|
38
|
+
const resultType: ProgressType<LocationLink[] | Location[]>;
|
|
47
39
|
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
|
|
48
40
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
const messages_1 = require("./messages");
|
|
8
9
|
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
9
10
|
let __noDynamicImport;
|
|
10
11
|
/**
|
|
@@ -15,6 +16,8 @@ let __noDynamicImport;
|
|
|
15
16
|
*/
|
|
16
17
|
var TypeDefinitionRequest;
|
|
17
18
|
(function (TypeDefinitionRequest) {
|
|
18
|
-
TypeDefinitionRequest.
|
|
19
|
+
TypeDefinitionRequest.method = 'textDocument/typeDefinition';
|
|
20
|
+
TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
|
|
21
|
+
/** @deprecated Use TypeDefinitionRequest.type */
|
|
19
22
|
TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
|
|
20
23
|
})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
|
|
2
|
+
import { ProtocolRequestType0, ProtocolNotificationType } from './messages';
|
|
2
3
|
export interface WorkspaceFoldersInitializeParams {
|
|
3
4
|
/**
|
|
4
5
|
* The actual configured workspace folders.
|
|
@@ -46,7 +47,7 @@ export interface WorkspaceFolder {
|
|
|
46
47
|
uri: string;
|
|
47
48
|
/**
|
|
48
49
|
* The name of the workspace folder. Used to refer to this
|
|
49
|
-
* workspace folder in
|
|
50
|
+
* workspace folder in the user interface.
|
|
50
51
|
*/
|
|
51
52
|
name: string;
|
|
52
53
|
}
|
|
@@ -54,7 +55,7 @@ export interface WorkspaceFolder {
|
|
|
54
55
|
* The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
|
|
55
56
|
*/
|
|
56
57
|
export declare namespace WorkspaceFoldersRequest {
|
|
57
|
-
const type:
|
|
58
|
+
const type: ProtocolRequestType0<WorkspaceFolder[] | null, never, void, void>;
|
|
58
59
|
type HandlerSignature = RequestHandler0<WorkspaceFolder[] | null, void>;
|
|
59
60
|
type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult<WorkspaceFolder[] | null, void>;
|
|
60
61
|
}
|
|
@@ -63,7 +64,7 @@ export declare namespace WorkspaceFoldersRequest {
|
|
|
63
64
|
* folder configuration changes.
|
|
64
65
|
*/
|
|
65
66
|
export declare namespace DidChangeWorkspaceFoldersNotification {
|
|
66
|
-
const type:
|
|
67
|
+
const type: ProtocolNotificationType<DidChangeWorkspaceFoldersParams, void>;
|
|
67
68
|
type HandlerSignature = NotificationHandler<DidChangeWorkspaceFoldersParams>;
|
|
68
69
|
type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void;
|
|
69
70
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const
|
|
7
|
+
const messages_1 = require("./messages");
|
|
8
8
|
/**
|
|
9
9
|
* The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
|
|
10
10
|
*/
|
|
11
11
|
var WorkspaceFoldersRequest;
|
|
12
12
|
(function (WorkspaceFoldersRequest) {
|
|
13
|
-
WorkspaceFoldersRequest.type = new
|
|
13
|
+
WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
|
|
14
14
|
})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
|
|
15
15
|
/**
|
|
16
16
|
* The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
|
|
@@ -18,5 +18,5 @@ var WorkspaceFoldersRequest;
|
|
|
18
18
|
*/
|
|
19
19
|
var DidChangeWorkspaceFoldersNotification;
|
|
20
20
|
(function (DidChangeWorkspaceFoldersNotification) {
|
|
21
|
-
DidChangeWorkspaceFoldersNotification.type = new
|
|
21
|
+
DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
|
|
22
22
|
})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
|
package/lib/utils/is.d.ts
CHANGED
|
@@ -6,5 +6,4 @@ export declare function func(value: any): value is Function;
|
|
|
6
6
|
export declare function array<T>(value: any): value is T[];
|
|
7
7
|
export declare function stringArray(value: any): value is string[];
|
|
8
8
|
export declare function typedArray<T>(value: any, check: (value: any) => boolean): value is T[];
|
|
9
|
-
export declare function thenable<T>(value: any): value is Thenable<T>;
|
|
10
9
|
export declare function objectLiteral(value: any): value is object;
|
package/lib/utils/is.js
CHANGED
|
@@ -36,10 +36,6 @@ function typedArray(value, check) {
|
|
|
36
36
|
return Array.isArray(value) && value.every(check);
|
|
37
37
|
}
|
|
38
38
|
exports.typedArray = typedArray;
|
|
39
|
-
function thenable(value) {
|
|
40
|
-
return value && func(value.then);
|
|
41
|
-
}
|
|
42
|
-
exports.thenable = thenable;
|
|
43
39
|
function objectLiteral(value) {
|
|
44
40
|
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
45
41
|
// doesn't use classes we ignore this for now. If we do we need to add something
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-languageserver-protocol",
|
|
3
3
|
"description": "VSCode Language Server Protocol implementation",
|
|
4
|
-
"version": "3.15.
|
|
4
|
+
"version": "3.15.2",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"main": "./lib/main.js",
|
|
16
16
|
"typings": "./lib/main",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"vscode-jsonrpc": "^
|
|
19
|
-
"vscode-languageserver-types": "
|
|
18
|
+
"vscode-jsonrpc": "^5.0.1",
|
|
19
|
+
"vscode-languageserver-types": "3.15.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prepublishOnly": "npm run clean && npm run compile && npm test",
|
|
23
23
|
"postpublish": "node ../build/npm/post-publish.js",
|
|
24
|
-
"compile": "node ../build/bin/tsc -
|
|
25
|
-
"watch": "node ../build/bin/tsc -
|
|
24
|
+
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
|
|
25
|
+
"watch": "node ../build/bin/tsc -b ./tsconfig.json -w",
|
|
26
26
|
"test": "node ../node_modules/mocha/bin/_mocha",
|
|
27
27
|
"clean": "node ../node_modules/rimraf/bin.js lib",
|
|
28
28
|
"preversion": "npm test"
|