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
|
@@ -32,6 +32,6 @@ export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneP
|
|
|
32
32
|
*/
|
|
33
33
|
export declare namespace DeclarationRequest {
|
|
34
34
|
const method: 'textDocument/declaration';
|
|
35
|
-
const type: ProtocolRequestType<DeclarationParams,
|
|
35
|
+
const type: ProtocolRequestType<DeclarationParams, Declaration | LocationLink[] | null, Location[] | LocationLink[], void, DeclarationRegistrationOptions>;
|
|
36
36
|
type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
|
|
37
37
|
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { NotificationHandler, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { WorkspaceEdit } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolNotificationType, ProtocolRequestType } from './messages';
|
|
4
|
+
/**
|
|
5
|
+
* Options for notifications/requests for user operations on files.
|
|
6
|
+
*
|
|
7
|
+
* @since 3.16.0
|
|
8
|
+
*/
|
|
9
|
+
export interface FileOperationOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The server is interested in didCreateFiles notifications.
|
|
12
|
+
*/
|
|
13
|
+
didCreate?: FileOperationRegistrationOptions;
|
|
14
|
+
/**
|
|
15
|
+
* The server is interested in willCreateFiles requests.
|
|
16
|
+
*/
|
|
17
|
+
willCreate?: FileOperationRegistrationOptions;
|
|
18
|
+
/**
|
|
19
|
+
* The server is interested in didRenameFiles notifications.
|
|
20
|
+
*/
|
|
21
|
+
didRename?: FileOperationRegistrationOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The server is interested in willRenameFiles requests.
|
|
24
|
+
*/
|
|
25
|
+
willRename?: FileOperationRegistrationOptions;
|
|
26
|
+
/**
|
|
27
|
+
* The server is interested in didDeleteFiles file notifications.
|
|
28
|
+
*/
|
|
29
|
+
didDelete?: FileOperationRegistrationOptions;
|
|
30
|
+
/**
|
|
31
|
+
* The server is interested in willDeleteFiles file requests.
|
|
32
|
+
*/
|
|
33
|
+
willDelete?: FileOperationRegistrationOptions;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The options to register for file operations.
|
|
37
|
+
*
|
|
38
|
+
* @since 3.16.0
|
|
39
|
+
*/
|
|
40
|
+
export interface FileOperationRegistrationOptions {
|
|
41
|
+
/**
|
|
42
|
+
* The actual filters.
|
|
43
|
+
*/
|
|
44
|
+
filters: FileOperationFilter[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A pattern kind describing if a glob pattern matches a file a folder or
|
|
48
|
+
* both.
|
|
49
|
+
*
|
|
50
|
+
* @since 3.16.0
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace FileOperationPatternKind {
|
|
53
|
+
/**
|
|
54
|
+
* The pattern matches a file only.
|
|
55
|
+
*/
|
|
56
|
+
const file: 'file';
|
|
57
|
+
/**
|
|
58
|
+
* The pattern matches a folder only.
|
|
59
|
+
*/
|
|
60
|
+
const folder: 'folder';
|
|
61
|
+
}
|
|
62
|
+
export declare type FileOperationPatternKind = 'file' | 'folder';
|
|
63
|
+
/**
|
|
64
|
+
* Matching options for the file operation pattern.
|
|
65
|
+
*
|
|
66
|
+
* @since 3.16.0
|
|
67
|
+
*/
|
|
68
|
+
export interface FileOperationPatternOptions {
|
|
69
|
+
/**
|
|
70
|
+
* The pattern should be matched ignoring casing.
|
|
71
|
+
*/
|
|
72
|
+
ignoreCase?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A pattern to describe in which file operation requests or notifications
|
|
76
|
+
* the server is interested in.
|
|
77
|
+
*
|
|
78
|
+
* @since 3.16.0
|
|
79
|
+
*/
|
|
80
|
+
interface FileOperationPattern {
|
|
81
|
+
/**
|
|
82
|
+
* The glob pattern to match. Glob patterns can have the following syntax:
|
|
83
|
+
* - `*` to match one or more characters in a path segment
|
|
84
|
+
* - `?` to match on one character in a path segment
|
|
85
|
+
* - `**` to match any number of path segments, including none
|
|
86
|
+
* - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
|
87
|
+
* - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
|
88
|
+
* - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
|
|
89
|
+
*/
|
|
90
|
+
glob: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to match files or folders with this pattern.
|
|
93
|
+
*
|
|
94
|
+
* Matches both if undefined.
|
|
95
|
+
*/
|
|
96
|
+
matches?: FileOperationPatternKind;
|
|
97
|
+
/**
|
|
98
|
+
* Additional options used during matching.
|
|
99
|
+
*/
|
|
100
|
+
options?: FileOperationPatternOptions;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A filter to describe in which file operation requests or notifications
|
|
104
|
+
* the server is interested in.
|
|
105
|
+
*
|
|
106
|
+
* @since 3.16.0
|
|
107
|
+
*/
|
|
108
|
+
export interface FileOperationFilter {
|
|
109
|
+
/**
|
|
110
|
+
* A Uri like `file` or `untitled`.
|
|
111
|
+
*/
|
|
112
|
+
scheme?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The actual file operation pattern.
|
|
115
|
+
*/
|
|
116
|
+
pattern: FileOperationPattern;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Capabilities relating to events from file operations by the user in the client.
|
|
120
|
+
*
|
|
121
|
+
* These events do not come from the file system, they come from user operations
|
|
122
|
+
* like renaming a file in the UI.
|
|
123
|
+
*
|
|
124
|
+
* @since 3.16.0
|
|
125
|
+
*/
|
|
126
|
+
export interface FileOperationClientCapabilities {
|
|
127
|
+
/**
|
|
128
|
+
* Whether the client supports dynamic registration for file requests/notifications.
|
|
129
|
+
*/
|
|
130
|
+
dynamicRegistration?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* The client has support for sending didCreateFiles notifications.
|
|
133
|
+
*/
|
|
134
|
+
didCreate?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* The client has support for willCreateFiles requests.
|
|
137
|
+
*/
|
|
138
|
+
willCreate?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* The client has support for sending didRenameFiles notifications.
|
|
141
|
+
*/
|
|
142
|
+
didRename?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The client has support for willRenameFiles requests.
|
|
145
|
+
*/
|
|
146
|
+
willRename?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* The client has support for sending didDeleteFiles notifications.
|
|
149
|
+
*/
|
|
150
|
+
didDelete?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The client has support for willDeleteFiles requests.
|
|
153
|
+
*/
|
|
154
|
+
willDelete?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The parameters sent in file create requests/notifications.
|
|
158
|
+
*
|
|
159
|
+
* @since 3.16.0
|
|
160
|
+
*/
|
|
161
|
+
export interface CreateFilesParams {
|
|
162
|
+
/**
|
|
163
|
+
* An array of all files/folders created in this operation.
|
|
164
|
+
*/
|
|
165
|
+
files: FileCreate[];
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Represents information on a file/folder create.
|
|
169
|
+
*
|
|
170
|
+
* @since 3.16.0
|
|
171
|
+
*/
|
|
172
|
+
export interface FileCreate {
|
|
173
|
+
/**
|
|
174
|
+
* A file:// URI for the location of the file/folder being created.
|
|
175
|
+
*/
|
|
176
|
+
uri: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The parameters sent in file rename requests/notifications.
|
|
180
|
+
*
|
|
181
|
+
* @since 3.16.0
|
|
182
|
+
*/
|
|
183
|
+
export interface RenameFilesParams {
|
|
184
|
+
/**
|
|
185
|
+
* An array of all files/folders renamed in this operation. When a folder is renamed, only
|
|
186
|
+
* the folder will be included, and not its children.
|
|
187
|
+
*/
|
|
188
|
+
files: FileRename[];
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Represents information on a file/folder rename.
|
|
192
|
+
*
|
|
193
|
+
* @since 3.16.0
|
|
194
|
+
*/
|
|
195
|
+
export interface FileRename {
|
|
196
|
+
/**
|
|
197
|
+
* A file:// URI for the original location of the file/folder being renamed.
|
|
198
|
+
*/
|
|
199
|
+
oldUri: string;
|
|
200
|
+
/**
|
|
201
|
+
* A file:// URI for the new location of the file/folder being renamed.
|
|
202
|
+
*/
|
|
203
|
+
newUri: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* The parameters sent in file delete requests/notifications.
|
|
207
|
+
*
|
|
208
|
+
* @since 3.16.0
|
|
209
|
+
*/
|
|
210
|
+
export interface DeleteFilesParams {
|
|
211
|
+
/**
|
|
212
|
+
* An array of all files/folders deleted in this operation.
|
|
213
|
+
*/
|
|
214
|
+
files: FileDelete[];
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Represents information on a file/folder delete.
|
|
218
|
+
*
|
|
219
|
+
* @since 3.16.0
|
|
220
|
+
*/
|
|
221
|
+
export interface FileDelete {
|
|
222
|
+
/**
|
|
223
|
+
* A file:// URI for the location of the file/folder being deleted.
|
|
224
|
+
*/
|
|
225
|
+
uri: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The will create files request is sent from the client to the server before files are actually
|
|
229
|
+
* created as long as the creation is triggered from within the client.
|
|
230
|
+
*
|
|
231
|
+
* @since 3.16.0
|
|
232
|
+
*/
|
|
233
|
+
export declare namespace WillCreateFilesRequest {
|
|
234
|
+
const method: 'workspace/willCreateFiles';
|
|
235
|
+
const type: ProtocolRequestType<CreateFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>;
|
|
236
|
+
type HandlerSignature = RequestHandler<CreateFilesParams, WorkspaceEdit | undefined | null, void>;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The did create files notification is sent from the client to the server when
|
|
240
|
+
* files were created from within the client.
|
|
241
|
+
*
|
|
242
|
+
* @since 3.16.0
|
|
243
|
+
*/
|
|
244
|
+
export declare namespace DidCreateFilesNotification {
|
|
245
|
+
const method: 'workspace/didCreateFiles';
|
|
246
|
+
const type: ProtocolNotificationType<CreateFilesParams, FileOperationRegistrationOptions>;
|
|
247
|
+
type HandlerSignature = NotificationHandler<CreateFilesParams>;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The will rename files request is sent from the client to the server before files are actually
|
|
251
|
+
* renamed as long as the rename is triggered from within the client.
|
|
252
|
+
*
|
|
253
|
+
* @since 3.16.0
|
|
254
|
+
*/
|
|
255
|
+
export declare namespace WillRenameFilesRequest {
|
|
256
|
+
const method: 'workspace/willRenameFiles';
|
|
257
|
+
const type: ProtocolRequestType<RenameFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>;
|
|
258
|
+
type HandlerSignature = RequestHandler<RenameFilesParams, WorkspaceEdit | undefined | null, void>;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The did rename files notification is sent from the client to the server when
|
|
262
|
+
* files were renamed from within the client.
|
|
263
|
+
*
|
|
264
|
+
* @since 3.16.0
|
|
265
|
+
*/
|
|
266
|
+
export declare namespace DidRenameFilesNotification {
|
|
267
|
+
const method: 'workspace/didRenameFiles';
|
|
268
|
+
const type: ProtocolNotificationType<RenameFilesParams, FileOperationRegistrationOptions>;
|
|
269
|
+
type HandlerSignature = NotificationHandler<RenameFilesParams>;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The will delete files request is sent from the client to the server before files are actually
|
|
273
|
+
* deleted as long as the deletion is triggered from within the client.
|
|
274
|
+
*
|
|
275
|
+
* @since 3.16.0
|
|
276
|
+
*/
|
|
277
|
+
export declare namespace DidDeleteFilesNotification {
|
|
278
|
+
const method: 'workspace/didDeleteFiles';
|
|
279
|
+
const type: ProtocolNotificationType<DeleteFilesParams, FileOperationRegistrationOptions>;
|
|
280
|
+
type HandlerSignature = NotificationHandler<DeleteFilesParams>;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* The did delete files notification is sent from the client to the server when
|
|
284
|
+
* files were deleted from within the client.
|
|
285
|
+
*
|
|
286
|
+
* @since 3.16.0
|
|
287
|
+
*/
|
|
288
|
+
export declare namespace WillDeleteFilesRequest {
|
|
289
|
+
const method: 'workspace/willDeleteFiles';
|
|
290
|
+
const type: ProtocolRequestType<DeleteFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>;
|
|
291
|
+
type HandlerSignature = RequestHandler<DeleteFilesParams, WorkspaceEdit | undefined | null, void>;
|
|
292
|
+
}
|
|
293
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
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.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A pattern kind describing if a glob pattern matches a file a folder or
|
|
11
|
+
* both.
|
|
12
|
+
*
|
|
13
|
+
* @since 3.16.0
|
|
14
|
+
*/
|
|
15
|
+
var FileOperationPatternKind;
|
|
16
|
+
(function (FileOperationPatternKind) {
|
|
17
|
+
/**
|
|
18
|
+
* The pattern matches a file only.
|
|
19
|
+
*/
|
|
20
|
+
FileOperationPatternKind.file = 'file';
|
|
21
|
+
/**
|
|
22
|
+
* The pattern matches a folder only.
|
|
23
|
+
*/
|
|
24
|
+
FileOperationPatternKind.folder = 'folder';
|
|
25
|
+
})(FileOperationPatternKind = exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {}));
|
|
26
|
+
/**
|
|
27
|
+
* The will create files request is sent from the client to the server before files are actually
|
|
28
|
+
* created as long as the creation is triggered from within the client.
|
|
29
|
+
*
|
|
30
|
+
* @since 3.16.0
|
|
31
|
+
*/
|
|
32
|
+
var WillCreateFilesRequest;
|
|
33
|
+
(function (WillCreateFilesRequest) {
|
|
34
|
+
WillCreateFilesRequest.method = 'workspace/willCreateFiles';
|
|
35
|
+
WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method);
|
|
36
|
+
})(WillCreateFilesRequest = exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {}));
|
|
37
|
+
/**
|
|
38
|
+
* The did create files notification is sent from the client to the server when
|
|
39
|
+
* files were created from within the client.
|
|
40
|
+
*
|
|
41
|
+
* @since 3.16.0
|
|
42
|
+
*/
|
|
43
|
+
var DidCreateFilesNotification;
|
|
44
|
+
(function (DidCreateFilesNotification) {
|
|
45
|
+
DidCreateFilesNotification.method = 'workspace/didCreateFiles';
|
|
46
|
+
DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method);
|
|
47
|
+
})(DidCreateFilesNotification = exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {}));
|
|
48
|
+
/**
|
|
49
|
+
* The will rename files request is sent from the client to the server before files are actually
|
|
50
|
+
* renamed as long as the rename is triggered from within the client.
|
|
51
|
+
*
|
|
52
|
+
* @since 3.16.0
|
|
53
|
+
*/
|
|
54
|
+
var WillRenameFilesRequest;
|
|
55
|
+
(function (WillRenameFilesRequest) {
|
|
56
|
+
WillRenameFilesRequest.method = 'workspace/willRenameFiles';
|
|
57
|
+
WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method);
|
|
58
|
+
})(WillRenameFilesRequest = exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {}));
|
|
59
|
+
/**
|
|
60
|
+
* The did rename files notification is sent from the client to the server when
|
|
61
|
+
* files were renamed from within the client.
|
|
62
|
+
*
|
|
63
|
+
* @since 3.16.0
|
|
64
|
+
*/
|
|
65
|
+
var DidRenameFilesNotification;
|
|
66
|
+
(function (DidRenameFilesNotification) {
|
|
67
|
+
DidRenameFilesNotification.method = 'workspace/didRenameFiles';
|
|
68
|
+
DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method);
|
|
69
|
+
})(DidRenameFilesNotification = exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {}));
|
|
70
|
+
/**
|
|
71
|
+
* The will delete files request is sent from the client to the server before files are actually
|
|
72
|
+
* deleted as long as the deletion is triggered from within the client.
|
|
73
|
+
*
|
|
74
|
+
* @since 3.16.0
|
|
75
|
+
*/
|
|
76
|
+
var DidDeleteFilesNotification;
|
|
77
|
+
(function (DidDeleteFilesNotification) {
|
|
78
|
+
DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';
|
|
79
|
+
DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method);
|
|
80
|
+
})(DidDeleteFilesNotification = exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {}));
|
|
81
|
+
/**
|
|
82
|
+
* The did delete files notification is sent from the client to the server when
|
|
83
|
+
* files were deleted from within the client.
|
|
84
|
+
*
|
|
85
|
+
* @since 3.16.0
|
|
86
|
+
*/
|
|
87
|
+
var WillDeleteFilesRequest;
|
|
88
|
+
(function (WillDeleteFilesRequest) {
|
|
89
|
+
WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';
|
|
90
|
+
WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method);
|
|
91
|
+
})(WillDeleteFilesRequest = exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {}));
|
|
92
|
+
//# sourceMappingURL=protocol.fileOperations.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
-
import { TextDocumentIdentifier } from 'vscode-languageserver-types';
|
|
2
|
+
import { TextDocumentIdentifier, uinteger, FoldingRange } from 'vscode-languageserver-types';
|
|
3
3
|
import { ProtocolRequestType } from './messages';
|
|
4
4
|
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
5
|
export interface FoldingRangeClientCapabilities {
|
|
@@ -13,7 +13,7 @@ export interface FoldingRangeClientCapabilities {
|
|
|
13
13
|
* The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
|
|
14
14
|
* hint, servers are free to follow the limit.
|
|
15
15
|
*/
|
|
16
|
-
rangeLimit?:
|
|
16
|
+
rangeLimit?: uinteger;
|
|
17
17
|
/**
|
|
18
18
|
* If set, the client signals that it only supports folding complete lines. If set, client will
|
|
19
19
|
* ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
|
|
@@ -41,33 +41,6 @@ export declare enum FoldingRangeKind {
|
|
|
41
41
|
*/
|
|
42
42
|
Region = "region"
|
|
43
43
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Represents a folding range.
|
|
46
|
-
*/
|
|
47
|
-
export interface FoldingRange {
|
|
48
|
-
/**
|
|
49
|
-
* The zero-based line number from where the folded range starts.
|
|
50
|
-
*/
|
|
51
|
-
startLine: number;
|
|
52
|
-
/**
|
|
53
|
-
* The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
|
|
54
|
-
*/
|
|
55
|
-
startCharacter?: number;
|
|
56
|
-
/**
|
|
57
|
-
* The zero-based line number where the folded range ends.
|
|
58
|
-
*/
|
|
59
|
-
endLine: number;
|
|
60
|
-
/**
|
|
61
|
-
* The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
|
|
62
|
-
*/
|
|
63
|
-
endCharacter?: number;
|
|
64
|
-
/**
|
|
65
|
-
* Describes the kind of the folding range such as `comment' or 'region'. The kind
|
|
66
|
-
* is used to categorize folding ranges and used by commands like 'Fold all comments'. See
|
|
67
|
-
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
|
|
68
|
-
*/
|
|
69
|
-
kind?: string;
|
|
70
|
-
}
|
|
71
44
|
/**
|
|
72
45
|
* Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
|
|
73
46
|
*/
|
|
@@ -33,6 +33,6 @@ export interface ImplementationParams extends TextDocumentPositionParams, WorkDo
|
|
|
33
33
|
*/
|
|
34
34
|
export declare namespace ImplementationRequest {
|
|
35
35
|
const method: 'textDocument/implementation';
|
|
36
|
-
const type: ProtocolRequestType<ImplementationParams,
|
|
36
|
+
const type: ProtocolRequestType<ImplementationParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, ImplementationRegistrationOptions>;
|
|
37
37
|
type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>;
|
|
38
38
|
}
|
package/lib/common/protocol.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
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.
|
|
8
|
-
|
|
7
|
+
exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.DocumentFilter = void 0;
|
|
8
|
+
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = void 0;
|
|
9
9
|
const messages_1 = require("./messages");
|
|
10
|
+
const Is = require("./utils/is");
|
|
10
11
|
const protocol_implementation_1 = require("./protocol.implementation");
|
|
11
12
|
Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
|
|
12
13
|
const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
|
|
@@ -34,15 +35,28 @@ Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable
|
|
|
34
35
|
Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
|
|
35
36
|
Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
|
|
36
37
|
const protocol_semanticTokens_1 = require("./protocol.semanticTokens");
|
|
37
|
-
Object.defineProperty(exports, "SemanticTokenTypes", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } });
|
|
38
|
-
Object.defineProperty(exports, "SemanticTokenModifiers", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } });
|
|
39
|
-
Object.defineProperty(exports, "SemanticTokens", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } });
|
|
40
38
|
Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
|
|
41
39
|
Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
|
|
42
40
|
Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
|
|
43
41
|
Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
|
|
44
42
|
Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
|
|
45
43
|
Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
|
|
44
|
+
const protocol_showDocument_1 = require("./protocol.showDocument");
|
|
45
|
+
Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
|
|
46
|
+
const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange");
|
|
47
|
+
Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
|
|
48
|
+
const protocol_fileOperations_1 = require("./protocol.fileOperations");
|
|
49
|
+
Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
|
|
50
|
+
Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
|
|
51
|
+
Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
|
|
52
|
+
Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
|
|
53
|
+
Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
|
|
54
|
+
Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
|
|
55
|
+
Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
|
|
56
|
+
const protocol_moniker_1 = require("./protocol.moniker");
|
|
57
|
+
Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
|
|
58
|
+
Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
|
|
59
|
+
Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
|
|
46
60
|
// @ts-ignore: to avoid inlining LocationLink as dynamic import
|
|
47
61
|
let __noDynamicImport;
|
|
48
62
|
/**
|
|
@@ -122,7 +136,7 @@ var FailureHandlingKind;
|
|
|
122
136
|
/**
|
|
123
137
|
* If the workspace edit contains only textual file changes they are executed transactional.
|
|
124
138
|
* If resource changes (create, rename or delete file) are part of the change the failure
|
|
125
|
-
* handling
|
|
139
|
+
* handling strategy is abort.
|
|
126
140
|
*/
|
|
127
141
|
FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
|
|
128
142
|
/**
|
|
@@ -196,7 +210,7 @@ var InitializeError;
|
|
|
196
210
|
InitializeError.unknownProtocolVersion = 1;
|
|
197
211
|
})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
|
|
198
212
|
/**
|
|
199
|
-
* The
|
|
213
|
+
* The initialized notification is sent from the client to the
|
|
200
214
|
* server after the client is fully initialized and the server
|
|
201
215
|
* is allowed to send requests from the server to the client.
|
|
202
216
|
*/
|
|
@@ -329,7 +343,7 @@ var DidOpenTextDocumentNotification;
|
|
|
329
343
|
var TextDocumentContentChangeEvent;
|
|
330
344
|
(function (TextDocumentContentChangeEvent) {
|
|
331
345
|
/**
|
|
332
|
-
* Checks whether the information
|
|
346
|
+
* Checks whether the information describes a delta event.
|
|
333
347
|
*/
|
|
334
348
|
function isIncremental(event) {
|
|
335
349
|
let candidate = event;
|
|
@@ -339,7 +353,7 @@ var TextDocumentContentChangeEvent;
|
|
|
339
353
|
}
|
|
340
354
|
TextDocumentContentChangeEvent.isIncremental = isIncremental;
|
|
341
355
|
/**
|
|
342
|
-
* Checks whether the information
|
|
356
|
+
* Checks whether the information describes a full replacement event.
|
|
343
357
|
*/
|
|
344
358
|
function isFull(event) {
|
|
345
359
|
let candidate = event;
|
|
@@ -619,12 +633,28 @@ var CodeActionResolveRequest;
|
|
|
619
633
|
* by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
|
|
620
634
|
* of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
|
|
621
635
|
* resolves to such.
|
|
636
|
+
*
|
|
637
|
+
* @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
|
|
638
|
+
* need to advertise support for WorkspaceSymbols via the client capability
|
|
639
|
+
* `workspace.symbol.resolveSupport`.
|
|
640
|
+
*
|
|
622
641
|
*/
|
|
623
642
|
var WorkspaceSymbolRequest;
|
|
624
643
|
(function (WorkspaceSymbolRequest) {
|
|
625
644
|
WorkspaceSymbolRequest.method = 'workspace/symbol';
|
|
626
645
|
WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
|
|
627
646
|
})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
|
|
647
|
+
/**
|
|
648
|
+
* A request to resolve the range inside the workspace
|
|
649
|
+
* symbol's location.
|
|
650
|
+
*
|
|
651
|
+
* @since 3.17.0 - proposed state
|
|
652
|
+
*/
|
|
653
|
+
var WorkspaceSymbolResolveRequest;
|
|
654
|
+
(function (WorkspaceSymbolResolveRequest) {
|
|
655
|
+
WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';
|
|
656
|
+
WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);
|
|
657
|
+
})(WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = {}));
|
|
628
658
|
/**
|
|
629
659
|
* A request to provide code lens for the given text document.
|
|
630
660
|
*/
|
|
@@ -641,6 +671,16 @@ var CodeLensResolveRequest;
|
|
|
641
671
|
CodeLensResolveRequest.method = 'codeLens/resolve';
|
|
642
672
|
CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
|
|
643
673
|
})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
|
|
674
|
+
/**
|
|
675
|
+
* A request to refresh all code actions
|
|
676
|
+
*
|
|
677
|
+
* @since 3.16.0
|
|
678
|
+
*/
|
|
679
|
+
var CodeLensRefreshRequest;
|
|
680
|
+
(function (CodeLensRefreshRequest) {
|
|
681
|
+
CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
|
|
682
|
+
CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
|
|
683
|
+
})(CodeLensRefreshRequest = exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));
|
|
644
684
|
/**
|
|
645
685
|
* A request to provide document links
|
|
646
686
|
*/
|
|
@@ -683,6 +723,15 @@ var DocumentOnTypeFormattingRequest;
|
|
|
683
723
|
DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
|
|
684
724
|
DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
|
|
685
725
|
})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
|
|
726
|
+
//---- Rename ----------------------------------------------
|
|
727
|
+
var PrepareSupportDefaultBehavior;
|
|
728
|
+
(function (PrepareSupportDefaultBehavior) {
|
|
729
|
+
/**
|
|
730
|
+
* The client's default behavior is to select the identifier
|
|
731
|
+
* according the to language's syntax rule.
|
|
732
|
+
*/
|
|
733
|
+
PrepareSupportDefaultBehavior.Identifier = 1;
|
|
734
|
+
})(PrepareSupportDefaultBehavior = exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));
|
|
686
735
|
/**
|
|
687
736
|
* A request to rename a symbol.
|
|
688
737
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Range } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { StaticRegistrationOptions, TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Client capabilities for the linked editing range request.
|
|
7
|
+
*
|
|
8
|
+
* @since 3.16.0
|
|
9
|
+
*/
|
|
10
|
+
export interface LinkedEditingRangeClientCapabilities {
|
|
11
|
+
/**
|
|
12
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
13
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
14
|
+
* return value for the corresponding server capability as well.
|
|
15
|
+
*/
|
|
16
|
+
dynamicRegistration?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
|
19
|
+
}
|
|
20
|
+
export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions {
|
|
21
|
+
}
|
|
22
|
+
export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The result of a linked editing range request.
|
|
26
|
+
*
|
|
27
|
+
* @since 3.16.0
|
|
28
|
+
*/
|
|
29
|
+
export interface LinkedEditingRanges {
|
|
30
|
+
/**
|
|
31
|
+
* A list of ranges that can be edited together. The ranges must have
|
|
32
|
+
* identical length and contain identical text content. The ranges cannot overlap.
|
|
33
|
+
*/
|
|
34
|
+
ranges: Range[];
|
|
35
|
+
/**
|
|
36
|
+
* An optional word pattern (regular expression) that describes valid contents for
|
|
37
|
+
* the given ranges. If no pattern is provided, the client configuration's word
|
|
38
|
+
* pattern will be used.
|
|
39
|
+
*/
|
|
40
|
+
wordPattern?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A request to provide ranges that can be edited together.
|
|
44
|
+
*
|
|
45
|
+
* @since 3.16.0
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace LinkedEditingRangeRequest {
|
|
48
|
+
const method: 'textDocument/linkedEditingRange';
|
|
49
|
+
const type: ProtocolRequestType<LinkedEditingRangeParams, LinkedEditingRanges | null, void, any, LinkedEditingRangeRegistrationOptions>;
|
|
50
|
+
type HandlerSignature = RequestHandler<LinkedEditingRangeParams, LinkedEditingRanges | null, void>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.LinkedEditingRangeRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to provide ranges that can be edited together.
|
|
11
|
+
*
|
|
12
|
+
* @since 3.16.0
|
|
13
|
+
*/
|
|
14
|
+
var LinkedEditingRangeRequest;
|
|
15
|
+
(function (LinkedEditingRangeRequest) {
|
|
16
|
+
LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
|
|
17
|
+
LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
|
|
18
|
+
})(LinkedEditingRangeRequest = exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));
|
|
19
|
+
//# sourceMappingURL=protocol.linkedEditingRange.js.map
|