vscode-languageserver-protocol 3.16.0-next.9 → 3.17.0-next.11
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/lib/browser/main.js +1 -1
- package/lib/common/api.d.ts +80 -17
- package/lib/common/api.js +44 -8
- package/lib/common/connection.d.ts +25 -17
- package/lib/common/connection.js +1 -1
- package/lib/common/messages.d.ts +19 -7
- package/lib/common/messages.js +7 -7
- package/lib/common/proposed.diagnostic.d.ts +324 -0
- package/lib/common/proposed.diagnostic.js +72 -0
- package/lib/common/proposed.inlineValue.d.ts +86 -0
- package/lib/common/proposed.inlineValue.js +29 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.js +1 -1
- package/lib/common/protocol.configuration.d.ts +4 -3
- package/lib/common/protocol.d.ts +466 -58
- package/lib/common/protocol.declaration.d.ts +1 -1
- package/lib/common/protocol.fileOperations.d.ts +293 -0
- package/lib/common/protocol.fileOperations.js +92 -0
- package/lib/common/protocol.foldingRange.d.ts +2 -29
- package/lib/common/protocol.implementation.d.ts +1 -1
- package/lib/common/protocol.js +58 -9
- package/lib/common/protocol.linkedEditingRange.d.ts +51 -0
- package/lib/common/protocol.linkedEditingRange.js +19 -0
- package/lib/common/{protocol.moniker.proposed.d.ts → protocol.moniker.d.ts} +11 -14
- package/lib/common/{protocol.moniker.proposed.js → protocol.moniker.js} +1 -1
- package/lib/common/protocol.progress.d.ts +6 -4
- package/lib/common/protocol.progress.js +4 -0
- package/lib/common/protocol.semanticTokens.d.ts +70 -134
- package/lib/common/protocol.semanticTokens.js +5 -69
- package/lib/common/protocol.showDocument.d.ts +71 -0
- package/lib/common/protocol.showDocument.js +22 -0
- package/lib/common/protocol.typeDefinition.d.ts +1 -1
- package/lib/common/protocol.workspaceFolders.d.ts +1 -1
- package/lib/node/main.js +1 -1
- package/package.json +5 -4
|
@@ -71,23 +71,20 @@ export interface Moniker {
|
|
|
71
71
|
*/
|
|
72
72
|
kind?: MonikerKind;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Client capabilities specific to the moniker request.
|
|
76
|
+
*
|
|
77
|
+
* @since 3.16.0
|
|
78
|
+
*/
|
|
74
79
|
export interface MonikerClientCapabilities {
|
|
75
|
-
textDocument?: {
|
|
76
|
-
moniker?: {
|
|
77
|
-
/**
|
|
78
|
-
* Whether moniker supports dynamic registration. If this is set to `true`
|
|
79
|
-
* the client supports the new `MonikerRegistrationOptions` return value
|
|
80
|
-
* for the corresponding server capability as well.
|
|
81
|
-
*/
|
|
82
|
-
dynamicRegistration?: boolean;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
export interface MonikerServerCapabilities {
|
|
87
80
|
/**
|
|
88
|
-
* Whether
|
|
81
|
+
* Whether moniker supports dynamic registration. If this is set to `true`
|
|
82
|
+
* the client supports the new `MonikerRegistrationOptions` return value
|
|
83
|
+
* for the corresponding server capability as well.
|
|
89
84
|
*/
|
|
90
|
-
|
|
85
|
+
dynamicRegistration?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface MonikerServerCapabilities {
|
|
91
88
|
}
|
|
92
89
|
export interface MonikerOptions extends WorkDoneProgressOptions {
|
|
93
90
|
}
|
|
@@ -65,4 +65,4 @@ var MonikerRequest;
|
|
|
65
65
|
MonikerRequest.method = 'textDocument/moniker';
|
|
66
66
|
MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
|
|
67
67
|
})(MonikerRequest = exports.MonikerRequest || (exports.MonikerRequest = {}));
|
|
68
|
-
//# sourceMappingURL=protocol.moniker.
|
|
68
|
+
//# sourceMappingURL=protocol.moniker.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
|
|
2
|
+
import { uinteger } from 'vscode-languageserver-types';
|
|
2
3
|
import { ProtocolRequestType, ProtocolNotificationType } from './messages';
|
|
3
4
|
export interface WorkDoneProgressClientCapabilities {
|
|
4
5
|
/**
|
|
@@ -43,9 +44,9 @@ export interface WorkDoneProgressBegin {
|
|
|
43
44
|
* to ignore the `percentage` value in subsequent in report notifications.
|
|
44
45
|
*
|
|
45
46
|
* The value should be steadily rising. Clients are free to ignore values
|
|
46
|
-
* that are not following this rule.
|
|
47
|
+
* that are not following this rule. The value range is [0, 100].
|
|
47
48
|
*/
|
|
48
|
-
percentage?:
|
|
49
|
+
percentage?: uinteger;
|
|
49
50
|
}
|
|
50
51
|
export interface WorkDoneProgressReport {
|
|
51
52
|
kind: 'report';
|
|
@@ -70,9 +71,9 @@ export interface WorkDoneProgressReport {
|
|
|
70
71
|
* to ignore the `percentage` value in subsequent in report notifications.
|
|
71
72
|
*
|
|
72
73
|
* The value should be steadily rising. Clients are free to ignore values
|
|
73
|
-
* that are not following this rule.
|
|
74
|
+
* that are not following this rule. The value range is [0, 100]
|
|
74
75
|
*/
|
|
75
|
-
percentage?:
|
|
76
|
+
percentage?: uinteger;
|
|
76
77
|
}
|
|
77
78
|
export interface WorkDoneProgressEnd {
|
|
78
79
|
kind: 'end';
|
|
@@ -84,6 +85,7 @@ export interface WorkDoneProgressEnd {
|
|
|
84
85
|
}
|
|
85
86
|
export declare namespace WorkDoneProgress {
|
|
86
87
|
const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd>;
|
|
88
|
+
function is(value: ProgressType<any>): value is typeof type;
|
|
87
89
|
}
|
|
88
90
|
export interface WorkDoneProgressCreateParams {
|
|
89
91
|
/**
|
|
@@ -10,6 +10,10 @@ const messages_1 = require("./messages");
|
|
|
10
10
|
var WorkDoneProgress;
|
|
11
11
|
(function (WorkDoneProgress) {
|
|
12
12
|
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
|
|
13
|
+
function is(value) {
|
|
14
|
+
return value === WorkDoneProgress.type;
|
|
15
|
+
}
|
|
16
|
+
WorkDoneProgress.is = is;
|
|
13
17
|
})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
|
|
14
18
|
/**
|
|
15
19
|
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
|
|
@@ -1,126 +1,15 @@
|
|
|
1
|
-
import { TextDocumentIdentifier, Range } from 'vscode-languageserver-types';
|
|
1
|
+
import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
|
|
2
|
+
import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
|
|
2
3
|
import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
|
|
3
4
|
import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
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
|
-
namespace = "namespace",
|
|
13
|
-
type = "type",
|
|
14
|
-
class = "class",
|
|
15
|
-
enum = "enum",
|
|
16
|
-
interface = "interface",
|
|
17
|
-
struct = "struct",
|
|
18
|
-
typeParameter = "typeParameter",
|
|
19
|
-
parameter = "parameter",
|
|
20
|
-
variable = "variable",
|
|
21
|
-
property = "property",
|
|
22
|
-
enumMember = "enumMember",
|
|
23
|
-
event = "event",
|
|
24
|
-
function = "function",
|
|
25
|
-
member = "member",
|
|
26
|
-
macro = "macro",
|
|
27
|
-
keyword = "keyword",
|
|
28
|
-
modifier = "modifier",
|
|
29
|
-
comment = "comment",
|
|
30
|
-
string = "string",
|
|
31
|
-
number = "number",
|
|
32
|
-
regexp = "regexp",
|
|
33
|
-
operator = "operator"
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* A set of predefined token modifiers. This set is not fixed
|
|
37
|
-
* an clients can specify additional token types via the
|
|
38
|
-
* corresponding client capabilities.
|
|
39
|
-
*
|
|
40
|
-
* @since 3.16.0 - Proposed state
|
|
41
|
-
*/
|
|
42
|
-
export declare enum SemanticTokenModifiers {
|
|
43
|
-
declaration = "declaration",
|
|
44
|
-
definition = "definition",
|
|
45
|
-
readonly = "readonly",
|
|
46
|
-
static = "static",
|
|
47
|
-
deprecated = "deprecated",
|
|
48
|
-
abstract = "abstract",
|
|
49
|
-
async = "async",
|
|
50
|
-
modification = "modification",
|
|
51
|
-
documentation = "documentation",
|
|
52
|
-
defaultLibrary = "defaultLibrary"
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @since 3.16.0 - Proposed state
|
|
56
|
-
*/
|
|
57
|
-
export interface SemanticTokensLegend {
|
|
58
|
-
/**
|
|
59
|
-
* The token types a server uses.
|
|
60
|
-
*/
|
|
61
|
-
tokenTypes: string[];
|
|
62
|
-
/**
|
|
63
|
-
* The token modifiers a server uses.
|
|
64
|
-
*/
|
|
65
|
-
tokenModifiers: string[];
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @since 3.16.0 - Proposed state
|
|
69
|
-
*/
|
|
70
|
-
export interface SemanticTokens {
|
|
71
|
-
/**
|
|
72
|
-
* An optional result id. If provided and clients support delta updating
|
|
73
|
-
* the client will include the result id in the next semantic token request.
|
|
74
|
-
* A server can then instead of computing all semantic tokens again simply
|
|
75
|
-
* send a delta.
|
|
76
|
-
*/
|
|
77
|
-
resultId?: string;
|
|
78
|
-
/**
|
|
79
|
-
* The actual tokens.
|
|
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
|
|
6
|
+
* @since 3.16.0
|
|
91
7
|
*/
|
|
92
8
|
export interface SemanticTokensPartialResult {
|
|
93
|
-
data:
|
|
9
|
+
data: uinteger[];
|
|
94
10
|
}
|
|
95
11
|
/**
|
|
96
|
-
* @since 3.16.0
|
|
97
|
-
*/
|
|
98
|
-
export interface SemanticTokensEdit {
|
|
99
|
-
/**
|
|
100
|
-
* The start offset of the edit.
|
|
101
|
-
*/
|
|
102
|
-
start: number;
|
|
103
|
-
/**
|
|
104
|
-
* The count of elements to remove.
|
|
105
|
-
*/
|
|
106
|
-
deleteCount: number;
|
|
107
|
-
/**
|
|
108
|
-
* The elements to insert.
|
|
109
|
-
*/
|
|
110
|
-
data?: number[];
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @since 3.16.0 - Proposed state
|
|
114
|
-
*/
|
|
115
|
-
export interface SemanticTokensDelta {
|
|
116
|
-
readonly resultId?: string;
|
|
117
|
-
/**
|
|
118
|
-
* The semantic token edits to transform a previous result into a new result.
|
|
119
|
-
*/
|
|
120
|
-
edits: SemanticTokensEdit[];
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* @since 3.16.0 - Proposed state
|
|
12
|
+
* @since 3.16.0
|
|
124
13
|
*/
|
|
125
14
|
export interface SemanticTokensDeltaPartialResult {
|
|
126
15
|
edits: SemanticTokensEdit[];
|
|
@@ -130,7 +19,7 @@ export declare namespace TokenFormat {
|
|
|
130
19
|
}
|
|
131
20
|
export declare type TokenFormat = 'relative';
|
|
132
21
|
/**
|
|
133
|
-
* @since 3.16.0
|
|
22
|
+
* @since 3.16.0
|
|
134
23
|
*/
|
|
135
24
|
export interface SemanticTokensClientCapabilities {
|
|
136
25
|
/**
|
|
@@ -141,6 +30,13 @@ export interface SemanticTokensClientCapabilities {
|
|
|
141
30
|
dynamicRegistration?: boolean;
|
|
142
31
|
/**
|
|
143
32
|
* Which requests the client supports and might send to the server
|
|
33
|
+
* depending on the server's capability. Please note that clients might not
|
|
34
|
+
* show semantic tokens or degrade some of the user experience if a range
|
|
35
|
+
* or full request is advertised by the client but not provided by the
|
|
36
|
+
* server. If for example the client capability `requests.full` and
|
|
37
|
+
* `request.range` are both set to true but the server only provides a
|
|
38
|
+
* range provider the client might not render a minimap correctly or might
|
|
39
|
+
* even decide to not show any semantic tokens at all.
|
|
144
40
|
*/
|
|
145
41
|
requests: {
|
|
146
42
|
/**
|
|
@@ -169,12 +65,42 @@ export interface SemanticTokensClientCapabilities {
|
|
|
169
65
|
*/
|
|
170
66
|
tokenModifiers: string[];
|
|
171
67
|
/**
|
|
172
|
-
* The formats the clients supports.
|
|
68
|
+
* The token formats the clients supports.
|
|
173
69
|
*/
|
|
174
70
|
formats: TokenFormat[];
|
|
71
|
+
/**
|
|
72
|
+
* Whether the client supports tokens that can overlap each other.
|
|
73
|
+
*/
|
|
74
|
+
overlappingTokenSupport?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the client supports tokens that can span multiple lines.
|
|
77
|
+
*/
|
|
78
|
+
multilineTokenSupport?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the client allows the server to actively cancel a
|
|
81
|
+
* semantic token request, e.g. supports returning
|
|
82
|
+
* LSPErrorCodes.ServerCancelled. If a server does the client
|
|
83
|
+
* needs to retrigger the request.
|
|
84
|
+
*
|
|
85
|
+
* @since 3.17.0
|
|
86
|
+
*/
|
|
87
|
+
serverCancelSupport?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Whether the client uses semantic tokens to augment existing
|
|
90
|
+
* syntax tokens. If set to `true` client side created syntax
|
|
91
|
+
* tokens and semantic tokens are both used for colorization. If
|
|
92
|
+
* set to `false` the client only uses the returned semantic tokens
|
|
93
|
+
* for colorization.
|
|
94
|
+
*
|
|
95
|
+
* If the value is `undefined` then the client behavior is not
|
|
96
|
+
* specified.
|
|
97
|
+
*
|
|
98
|
+
* @since 3.17.0
|
|
99
|
+
*/
|
|
100
|
+
augmentsSyntaxTokens?: boolean;
|
|
175
101
|
}
|
|
176
102
|
/**
|
|
177
|
-
* @since 3.16.0
|
|
103
|
+
* @since 3.16.0
|
|
178
104
|
*/
|
|
179
105
|
export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
180
106
|
/**
|
|
@@ -182,7 +108,7 @@ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
|
182
108
|
*/
|
|
183
109
|
legend: SemanticTokensLegend;
|
|
184
110
|
/**
|
|
185
|
-
* Server supports providing semantic tokens for a
|
|
111
|
+
* Server supports providing semantic tokens for a specific range
|
|
186
112
|
* of a document.
|
|
187
113
|
*/
|
|
188
114
|
range?: boolean | {};
|
|
@@ -197,7 +123,7 @@ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
|
197
123
|
};
|
|
198
124
|
}
|
|
199
125
|
/**
|
|
200
|
-
* @since 3.16.0
|
|
126
|
+
* @since 3.16.0
|
|
201
127
|
*/
|
|
202
128
|
export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
|
|
203
129
|
}
|
|
@@ -206,7 +132,7 @@ export declare namespace SemanticTokensRegistrationType {
|
|
|
206
132
|
const type: RegistrationType<SemanticTokensRegistrationOptions>;
|
|
207
133
|
}
|
|
208
134
|
/**
|
|
209
|
-
* @since 3.16.0
|
|
135
|
+
* @since 3.16.0
|
|
210
136
|
*/
|
|
211
137
|
export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
|
|
212
138
|
/**
|
|
@@ -215,14 +141,15 @@ export interface SemanticTokensParams extends WorkDoneProgressParams, PartialRes
|
|
|
215
141
|
textDocument: TextDocumentIdentifier;
|
|
216
142
|
}
|
|
217
143
|
/**
|
|
218
|
-
* @since 3.16.0
|
|
144
|
+
* @since 3.16.0
|
|
219
145
|
*/
|
|
220
146
|
export declare namespace SemanticTokensRequest {
|
|
221
147
|
const method: 'textDocument/semanticTokens/full';
|
|
222
148
|
const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
149
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
|
|
223
150
|
}
|
|
224
151
|
/**
|
|
225
|
-
* @since 3.16.0
|
|
152
|
+
* @since 3.16.0
|
|
226
153
|
*/
|
|
227
154
|
export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams {
|
|
228
155
|
/**
|
|
@@ -231,19 +158,20 @@ export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, Parti
|
|
|
231
158
|
textDocument: TextDocumentIdentifier;
|
|
232
159
|
/**
|
|
233
160
|
* The result id of a previous response. The result Id can either point to a full response
|
|
234
|
-
* or a delta response depending on what was
|
|
161
|
+
* or a delta response depending on what was received last.
|
|
235
162
|
*/
|
|
236
163
|
previousResultId: string;
|
|
237
164
|
}
|
|
238
165
|
/**
|
|
239
|
-
* @since 3.16.0
|
|
166
|
+
* @since 3.16.0
|
|
240
167
|
*/
|
|
241
168
|
export declare namespace SemanticTokensDeltaRequest {
|
|
242
169
|
const method: 'textDocument/semanticTokens/full/delta';
|
|
243
170
|
const type: ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
171
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
|
|
244
172
|
}
|
|
245
173
|
/**
|
|
246
|
-
* @since 3.16.0
|
|
174
|
+
* @since 3.16.0
|
|
247
175
|
*/
|
|
248
176
|
export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
249
177
|
/**
|
|
@@ -256,25 +184,33 @@ export interface SemanticTokensRangeParams extends WorkDoneProgressParams, Parti
|
|
|
256
184
|
range: Range;
|
|
257
185
|
}
|
|
258
186
|
/**
|
|
259
|
-
* @since 3.16.0
|
|
187
|
+
* @since 3.16.0
|
|
260
188
|
*/
|
|
261
189
|
export declare namespace SemanticTokensRangeRequest {
|
|
262
190
|
const method: 'textDocument/semanticTokens/range';
|
|
263
191
|
const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
|
192
|
+
type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
|
|
264
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* @since 3.16.0
|
|
196
|
+
*/
|
|
265
197
|
export interface SemanticTokensWorkspaceClientCapabilities {
|
|
266
198
|
/**
|
|
267
|
-
* Whether the client implementation supports a refresh request
|
|
268
|
-
* to the client.
|
|
269
|
-
*
|
|
270
|
-
* the
|
|
199
|
+
* Whether the client implementation supports a refresh request sent from
|
|
200
|
+
* the server to the client.
|
|
201
|
+
*
|
|
202
|
+
* Note that this event is global and will force the client to refresh all
|
|
203
|
+
* semantic tokens currently shown. It should be used with absolute care
|
|
204
|
+
* and is useful for situation where a server for example detects a project
|
|
205
|
+
* wide change that requires such a calculation.
|
|
271
206
|
*/
|
|
272
207
|
refreshSupport?: boolean;
|
|
273
208
|
}
|
|
274
209
|
/**
|
|
275
|
-
* @since 3.16.0
|
|
210
|
+
* @since 3.16.0
|
|
276
211
|
*/
|
|
277
212
|
export declare namespace SemanticTokensRefreshRequest {
|
|
278
213
|
const method: `workspace/semanticTokens/refresh`;
|
|
279
|
-
const type: ProtocolRequestType0<void, void, void,
|
|
214
|
+
const type: ProtocolRequestType0<void, void, void, void>;
|
|
215
|
+
type HandlerSignature = RequestHandler0<void, void>;
|
|
280
216
|
}
|
|
@@ -4,72 +4,8 @@
|
|
|
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.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat =
|
|
7
|
+
exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0;
|
|
8
8
|
const messages_1 = require("./messages");
|
|
9
|
-
/**
|
|
10
|
-
* A set of predefined token types. This set is not fixed
|
|
11
|
-
* an clients can specify additional token types via the
|
|
12
|
-
* corresponding client capabilities.
|
|
13
|
-
*
|
|
14
|
-
* @since 3.16.0 - Proposed state
|
|
15
|
-
*/
|
|
16
|
-
var SemanticTokenTypes;
|
|
17
|
-
(function (SemanticTokenTypes) {
|
|
18
|
-
SemanticTokenTypes["namespace"] = "namespace";
|
|
19
|
-
SemanticTokenTypes["type"] = "type";
|
|
20
|
-
SemanticTokenTypes["class"] = "class";
|
|
21
|
-
SemanticTokenTypes["enum"] = "enum";
|
|
22
|
-
SemanticTokenTypes["interface"] = "interface";
|
|
23
|
-
SemanticTokenTypes["struct"] = "struct";
|
|
24
|
-
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
25
|
-
SemanticTokenTypes["parameter"] = "parameter";
|
|
26
|
-
SemanticTokenTypes["variable"] = "variable";
|
|
27
|
-
SemanticTokenTypes["property"] = "property";
|
|
28
|
-
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
29
|
-
SemanticTokenTypes["event"] = "event";
|
|
30
|
-
SemanticTokenTypes["function"] = "function";
|
|
31
|
-
SemanticTokenTypes["member"] = "member";
|
|
32
|
-
SemanticTokenTypes["macro"] = "macro";
|
|
33
|
-
SemanticTokenTypes["keyword"] = "keyword";
|
|
34
|
-
SemanticTokenTypes["modifier"] = "modifier";
|
|
35
|
-
SemanticTokenTypes["comment"] = "comment";
|
|
36
|
-
SemanticTokenTypes["string"] = "string";
|
|
37
|
-
SemanticTokenTypes["number"] = "number";
|
|
38
|
-
SemanticTokenTypes["regexp"] = "regexp";
|
|
39
|
-
SemanticTokenTypes["operator"] = "operator";
|
|
40
|
-
})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
|
|
41
|
-
/**
|
|
42
|
-
* A set of predefined token modifiers. This set is not fixed
|
|
43
|
-
* an clients can specify additional token types via the
|
|
44
|
-
* corresponding client capabilities.
|
|
45
|
-
*
|
|
46
|
-
* @since 3.16.0 - Proposed state
|
|
47
|
-
*/
|
|
48
|
-
var SemanticTokenModifiers;
|
|
49
|
-
(function (SemanticTokenModifiers) {
|
|
50
|
-
SemanticTokenModifiers["declaration"] = "declaration";
|
|
51
|
-
SemanticTokenModifiers["definition"] = "definition";
|
|
52
|
-
SemanticTokenModifiers["readonly"] = "readonly";
|
|
53
|
-
SemanticTokenModifiers["static"] = "static";
|
|
54
|
-
SemanticTokenModifiers["deprecated"] = "deprecated";
|
|
55
|
-
SemanticTokenModifiers["abstract"] = "abstract";
|
|
56
|
-
SemanticTokenModifiers["async"] = "async";
|
|
57
|
-
SemanticTokenModifiers["modification"] = "modification";
|
|
58
|
-
SemanticTokenModifiers["documentation"] = "documentation";
|
|
59
|
-
SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
|
|
60
|
-
})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
|
|
61
|
-
/**
|
|
62
|
-
* @since 3.16.0 - Proposed state
|
|
63
|
-
*/
|
|
64
|
-
var SemanticTokens;
|
|
65
|
-
(function (SemanticTokens) {
|
|
66
|
-
function is(value) {
|
|
67
|
-
const candidate = value;
|
|
68
|
-
return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
69
|
-
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
70
|
-
}
|
|
71
|
-
SemanticTokens.is = is;
|
|
72
|
-
})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
|
|
73
9
|
//------- 'textDocument/semanticTokens' -----
|
|
74
10
|
var TokenFormat;
|
|
75
11
|
(function (TokenFormat) {
|
|
@@ -81,7 +17,7 @@ var SemanticTokensRegistrationType;
|
|
|
81
17
|
SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);
|
|
82
18
|
})(SemanticTokensRegistrationType = exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {}));
|
|
83
19
|
/**
|
|
84
|
-
* @since 3.16.0
|
|
20
|
+
* @since 3.16.0
|
|
85
21
|
*/
|
|
86
22
|
var SemanticTokensRequest;
|
|
87
23
|
(function (SemanticTokensRequest) {
|
|
@@ -89,7 +25,7 @@ var SemanticTokensRequest;
|
|
|
89
25
|
SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
|
|
90
26
|
})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
|
|
91
27
|
/**
|
|
92
|
-
* @since 3.16.0
|
|
28
|
+
* @since 3.16.0
|
|
93
29
|
*/
|
|
94
30
|
var SemanticTokensDeltaRequest;
|
|
95
31
|
(function (SemanticTokensDeltaRequest) {
|
|
@@ -97,7 +33,7 @@ var SemanticTokensDeltaRequest;
|
|
|
97
33
|
SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
|
|
98
34
|
})(SemanticTokensDeltaRequest = exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));
|
|
99
35
|
/**
|
|
100
|
-
* @since 3.16.0
|
|
36
|
+
* @since 3.16.0
|
|
101
37
|
*/
|
|
102
38
|
var SemanticTokensRangeRequest;
|
|
103
39
|
(function (SemanticTokensRangeRequest) {
|
|
@@ -105,7 +41,7 @@ var SemanticTokensRangeRequest;
|
|
|
105
41
|
SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
|
|
106
42
|
})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
|
|
107
43
|
/**
|
|
108
|
-
* @since 3.16.0
|
|
44
|
+
* @since 3.16.0
|
|
109
45
|
*/
|
|
110
46
|
var SemanticTokensRefreshRequest;
|
|
111
47
|
(function (SemanticTokensRefreshRequest) {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { HandlerResult, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Range, URI } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
/**
|
|
5
|
+
* Client capabilities for the show document request.
|
|
6
|
+
*
|
|
7
|
+
* @since 3.16.0
|
|
8
|
+
*/
|
|
9
|
+
export interface ShowDocumentClientCapabilities {
|
|
10
|
+
/**
|
|
11
|
+
* The client has support for the show document
|
|
12
|
+
* request.
|
|
13
|
+
*/
|
|
14
|
+
support: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Params to show a document.
|
|
18
|
+
*
|
|
19
|
+
* @since 3.16.0
|
|
20
|
+
*/
|
|
21
|
+
export interface ShowDocumentParams {
|
|
22
|
+
/**
|
|
23
|
+
* The document 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 in 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 an show document 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 type: ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>;
|
|
69
|
+
type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
|
|
70
|
+
type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
|
|
71
|
+
}
|
|
@@ -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.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.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);
|
|
21
|
+
})(ShowDocumentRequest = exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {}));
|
|
22
|
+
//# sourceMappingURL=protocol.showDocument.js.map
|
|
@@ -33,6 +33,6 @@ export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDo
|
|
|
33
33
|
*/
|
|
34
34
|
export declare namespace TypeDefinitionRequest {
|
|
35
35
|
const method: 'textDocument/typeDefinition';
|
|
36
|
-
const type: ProtocolRequestType<TypeDefinitionParams,
|
|
36
|
+
const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
|
|
37
37
|
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
|
|
38
38
|
}
|
|
@@ -34,7 +34,7 @@ export interface WorkspaceFoldersServerCapabilities {
|
|
|
34
34
|
* change notifications.
|
|
35
35
|
*
|
|
36
36
|
* If a strings is provided the string is treated as a ID
|
|
37
|
-
* under which the notification is
|
|
37
|
+
* under which the notification is registered on the client
|
|
38
38
|
* side. The ID can be used to unregister for these events
|
|
39
39
|
* using the `client/unregisterCapability` request.
|
|
40
40
|
*/
|
package/lib/node/main.js
CHANGED
|
@@ -19,7 +19,7 @@ const node_1 = require("vscode-jsonrpc/node");
|
|
|
19
19
|
__exportStar(require("vscode-jsonrpc/node"), exports);
|
|
20
20
|
__exportStar(require("../common/api"), exports);
|
|
21
21
|
function createProtocolConnection(input, output, logger, options) {
|
|
22
|
-
return node_1.createMessageConnection(input, output, logger, options);
|
|
22
|
+
return (0, node_1.createMessageConnection)(input, output, logger, options);
|
|
23
23
|
}
|
|
24
24
|
exports.createProtocolConnection = createProtocolConnection;
|
|
25
25
|
//# sourceMappingURL=main.js.map
|
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.
|
|
4
|
+
"version": "3.17.0-next.11",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"typings": "./lib/common/api.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode-jsonrpc": "
|
|
22
|
-
"vscode-languageserver-types": "3.
|
|
21
|
+
"vscode-jsonrpc": "8.0.0-next.4",
|
|
22
|
+
"vscode-languageserver-types": "3.17.0-next.5"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test",
|
|
@@ -28,10 +28,11 @@
|
|
|
28
28
|
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
|
|
29
29
|
"watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w",
|
|
30
30
|
"clean": "node ../node_modules/rimraf/bin.js lib && node ../node_modules/rimraf/bin.js dist",
|
|
31
|
+
"lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src",
|
|
31
32
|
"test": "npm run test:node && npm run test:browser",
|
|
32
33
|
"test:node": "node ../node_modules/mocha/bin/_mocha",
|
|
33
34
|
"test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/protocol/src/browser/test/",
|
|
34
35
|
"webpack:test": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js",
|
|
35
|
-
"webpack:test:silent": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --
|
|
36
|
+
"webpack:test:silent": "cd ../types && npm run compile:esm && cd ../protocol && node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js"
|
|
36
37
|
}
|
|
37
38
|
}
|