vscode-languageserver-protocol 3.16.0-next.8 → 3.17.0-next.10

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.
Files changed (44) hide show
  1. package/lib/browser/main.js +1 -1
  2. package/lib/common/api.d.ts +80 -17
  3. package/lib/common/api.js +44 -8
  4. package/lib/common/connection.d.ts +36 -23
  5. package/lib/common/connection.js +1 -1
  6. package/lib/common/messages.d.ts +35 -6
  7. package/lib/common/messages.js +13 -7
  8. package/lib/common/proposed.diagnostic.d.ts +324 -0
  9. package/lib/common/proposed.diagnostic.js +72 -0
  10. package/lib/common/proposed.inlineValue.d.ts +86 -0
  11. package/lib/common/proposed.inlineValue.js +29 -0
  12. package/lib/common/proposed.typeHierarchy.d.ts +83 -0
  13. package/lib/common/proposed.typeHierarchy.js +40 -0
  14. package/lib/common/protocol.callHierarchy.js +1 -1
  15. package/lib/common/protocol.colorProvider.d.ts +1 -3
  16. package/lib/common/protocol.colorProvider.js +0 -3
  17. package/lib/common/protocol.configuration.d.ts +4 -3
  18. package/lib/common/protocol.d.ts +470 -77
  19. package/lib/common/protocol.declaration.d.ts +2 -4
  20. package/lib/common/protocol.declaration.js +0 -3
  21. package/lib/common/protocol.fileOperations.d.ts +293 -0
  22. package/lib/common/protocol.fileOperations.js +92 -0
  23. package/lib/common/protocol.foldingRange.d.ts +3 -32
  24. package/lib/common/protocol.foldingRange.js +0 -3
  25. package/lib/common/protocol.implementation.d.ts +2 -4
  26. package/lib/common/protocol.implementation.js +0 -3
  27. package/lib/common/protocol.js +65 -31
  28. package/lib/common/protocol.linkedEditingRange.d.ts +51 -0
  29. package/lib/common/protocol.linkedEditingRange.js +19 -0
  30. package/lib/common/{protocol.moniker.proposed.d.ts → protocol.moniker.d.ts} +11 -14
  31. package/lib/common/{protocol.moniker.proposed.js → protocol.moniker.js} +1 -1
  32. package/lib/common/protocol.progress.d.ts +6 -4
  33. package/lib/common/protocol.progress.js +4 -0
  34. package/lib/common/protocol.selectionRange.d.ts +1 -3
  35. package/lib/common/protocol.selectionRange.js +0 -3
  36. package/lib/common/protocol.semanticTokens.d.ts +75 -135
  37. package/lib/common/protocol.semanticTokens.js +10 -69
  38. package/lib/common/protocol.showDocument.d.ts +71 -0
  39. package/lib/common/protocol.showDocument.js +22 -0
  40. package/lib/common/protocol.typeDefinition.d.ts +2 -4
  41. package/lib/common/protocol.typeDefinition.js +0 -3
  42. package/lib/common/protocol.workspaceFolders.d.ts +1 -1
  43. package/lib/node/main.js +1 -1
  44. package/package.json +6 -5
@@ -1,126 +1,15 @@
1
- import { TextDocumentIdentifier, Range } from 'vscode-languageserver-types';
2
- import { ProtocolRequestType, ProtocolRequestType0 } from './messages';
1
+ import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
2
+ import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
3
+ import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
3
4
  import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
4
5
  /**
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
- 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: number[];
9
+ data: uinteger[];
94
10
  }
95
11
  /**
96
- * @since 3.16.0 - Proposed state
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 - Proposed state
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 - Proposed state
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 sepcific range
111
+ * Server supports providing semantic tokens for a specific range
186
112
  * of a document.
187
113
  */
188
114
  range?: boolean | {};
@@ -197,12 +123,16 @@ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
197
123
  };
198
124
  }
199
125
  /**
200
- * @since 3.16.0 - Proposed state
126
+ * @since 3.16.0
201
127
  */
202
128
  export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
203
129
  }
130
+ export declare namespace SemanticTokensRegistrationType {
131
+ const method: 'textDocument/semanticTokens';
132
+ const type: RegistrationType<SemanticTokensRegistrationOptions>;
133
+ }
204
134
  /**
205
- * @since 3.16.0 - Proposed state
135
+ * @since 3.16.0
206
136
  */
207
137
  export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
208
138
  /**
@@ -211,14 +141,15 @@ export interface SemanticTokensParams extends WorkDoneProgressParams, PartialRes
211
141
  textDocument: TextDocumentIdentifier;
212
142
  }
213
143
  /**
214
- * @since 3.16.0 - Proposed state
144
+ * @since 3.16.0
215
145
  */
216
146
  export declare namespace SemanticTokensRequest {
217
147
  const method: 'textDocument/semanticTokens/full';
218
148
  const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
149
+ type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
219
150
  }
220
151
  /**
221
- * @since 3.16.0 - Proposed state
152
+ * @since 3.16.0
222
153
  */
223
154
  export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams {
224
155
  /**
@@ -227,19 +158,20 @@ export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, Parti
227
158
  textDocument: TextDocumentIdentifier;
228
159
  /**
229
160
  * The result id of a previous response. The result Id can either point to a full response
230
- * or a delta response depending on what was recevied last.
161
+ * or a delta response depending on what was received last.
231
162
  */
232
163
  previousResultId: string;
233
164
  }
234
165
  /**
235
- * @since 3.16.0 - Proposed state
166
+ * @since 3.16.0
236
167
  */
237
168
  export declare namespace SemanticTokensDeltaRequest {
238
169
  const method: 'textDocument/semanticTokens/full/delta';
239
170
  const type: ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>;
171
+ type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
240
172
  }
241
173
  /**
242
- * @since 3.16.0 - Proposed state
174
+ * @since 3.16.0
243
175
  */
244
176
  export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
245
177
  /**
@@ -252,25 +184,33 @@ export interface SemanticTokensRangeParams extends WorkDoneProgressParams, Parti
252
184
  range: Range;
253
185
  }
254
186
  /**
255
- * @since 3.16.0 - Proposed state
187
+ * @since 3.16.0
256
188
  */
257
189
  export declare namespace SemanticTokensRangeRequest {
258
190
  const method: 'textDocument/semanticTokens/range';
259
191
  const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
192
+ type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
260
193
  }
194
+ /**
195
+ * @since 3.16.0
196
+ */
261
197
  export interface SemanticTokensWorkspaceClientCapabilities {
262
198
  /**
263
- * Whether the client implementation supports a refresh request send from the server
264
- * to the client. This is useful if a server detects a project wide configuration change
265
- * which requires a re-calculation of all semantic tokens provided by the server issuing
266
- * the request.
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.
267
206
  */
268
207
  refreshSupport?: boolean;
269
208
  }
270
209
  /**
271
- * @since 3.16.0 - Proposed state
210
+ * @since 3.16.0
272
211
  */
273
212
  export declare namespace SemanticTokensRefreshRequest {
274
213
  const method: `workspace/semanticTokens/refresh`;
275
- const type: ProtocolRequestType0<void, void, void, SemanticTokensRegistrationOptions>;
214
+ const type: ProtocolRequestType0<void, void, void, void>;
215
+ type HandlerSignature = RequestHandler0<void, void>;
276
216
  }
@@ -4,79 +4,20 @@
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.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = void 0;
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) {
76
12
  TokenFormat.Relative = 'relative';
77
13
  })(TokenFormat = exports.TokenFormat || (exports.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 || (exports.SemanticTokensRegistrationType = {}));
78
19
  /**
79
- * @since 3.16.0 - Proposed state
20
+ * @since 3.16.0
80
21
  */
81
22
  var SemanticTokensRequest;
82
23
  (function (SemanticTokensRequest) {
@@ -84,7 +25,7 @@ var SemanticTokensRequest;
84
25
  SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
85
26
  })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
86
27
  /**
87
- * @since 3.16.0 - Proposed state
28
+ * @since 3.16.0
88
29
  */
89
30
  var SemanticTokensDeltaRequest;
90
31
  (function (SemanticTokensDeltaRequest) {
@@ -92,7 +33,7 @@ var SemanticTokensDeltaRequest;
92
33
  SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
93
34
  })(SemanticTokensDeltaRequest = exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));
94
35
  /**
95
- * @since 3.16.0 - Proposed state
36
+ * @since 3.16.0
96
37
  */
97
38
  var SemanticTokensRangeRequest;
98
39
  (function (SemanticTokensRangeRequest) {
@@ -100,7 +41,7 @@ var SemanticTokensRangeRequest;
100
41
  SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
101
42
  })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
102
43
  /**
103
- * @since 3.16.0 - Proposed state
44
+ * @since 3.16.0
104
45
  */
105
46
  var SemanticTokensRefreshRequest;
106
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
@@ -1,4 +1,4 @@
1
- import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler } from 'vscode-jsonrpc';
2
2
  import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
3
3
  import { ProtocolRequestType } from './messages';
4
4
  import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
@@ -33,8 +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, Location | Location[] | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
37
- /** @deprecated Use TypeDefinitionRequest.type */
38
- const resultType: ProgressType<Location[] | LocationLink[]>;
36
+ const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
39
37
  type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
40
38
  }
@@ -5,7 +5,6 @@
5
5
  * ------------------------------------------------------------------------------------------ */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.TypeDefinitionRequest = void 0;
8
- const vscode_jsonrpc_1 = require("vscode-jsonrpc");
9
8
  const messages_1 = require("./messages");
10
9
  // @ts-ignore: to avoid inlining LocatioLink as dynamic import
11
10
  let __noDynamicImport;
@@ -19,7 +18,5 @@ var TypeDefinitionRequest;
19
18
  (function (TypeDefinitionRequest) {
20
19
  TypeDefinitionRequest.method = 'textDocument/typeDefinition';
21
20
  TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
22
- /** @deprecated Use TypeDefinitionRequest.type */
23
- TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
24
21
  })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
25
22
  //# sourceMappingURL=protocol.typeDefinition.js.map
@@ -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 registed on the client
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.16.0-next.8",
4
+ "version": "3.17.0-next.10",
5
5
  "author": "Microsoft Corporation",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -18,20 +18,21 @@
18
18
  },
19
19
  "typings": "./lib/common/api.d.ts",
20
20
  "dependencies": {
21
- "vscode-jsonrpc": "6.0.0-next.6",
22
- "vscode-languageserver-types": "3.16.0-next.4"
21
+ "vscode-jsonrpc": "8.0.0-next.4",
22
+ "vscode-languageserver-types": "3.17.0-next.5"
23
23
  },
24
24
  "scripts": {
25
- "prepublishOnly": "npm run clean && npm run compile && npm test",
25
+ "prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test",
26
26
  "postpublish": "node ../build/npm/post-publish.js",
27
27
  "preversion": "npm test",
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 --silent --mode none --config ./src/browser/test/webpack.config.js"
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
  }