vscode-languageserver-protocol 3.17.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/License.txt +11 -0
- package/README.md +16 -0
- package/browser.d.ts +6 -0
- package/browser.js +7 -0
- package/lib/browser/main.d.ts +4 -0
- package/lib/browser/main.js +25 -0
- package/lib/common/api.d.ts +94 -0
- package/lib/common/api.js +87 -0
- package/lib/common/connection.d.ts +163 -0
- package/lib/common/connection.js +16 -0
- package/lib/common/messages.d.ts +44 -0
- package/lib/common/messages.js +39 -0
- package/lib/common/proposed.diagnostic.d.ts +324 -0
- package/lib/common/proposed.diagnostic.js +72 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.d.ts +83 -0
- package/lib/common/protocol.callHierarchy.js +40 -0
- package/lib/common/protocol.colorProvider.d.ts +63 -0
- package/lib/common/protocol.colorProvider.js +30 -0
- package/lib/common/protocol.configuration.d.ts +46 -0
- package/lib/common/protocol.configuration.js +22 -0
- package/lib/common/protocol.d.ts +2750 -0
- package/lib/common/protocol.declaration.d.ts +37 -0
- package/lib/common/protocol.declaration.js +23 -0
- package/lib/common/protocol.fileOperations.d.ts +293 -0
- package/lib/common/protocol.fileOperations.js +92 -0
- package/lib/common/protocol.foldingRange.d.ts +63 -0
- package/lib/common/protocol.foldingRange.js +38 -0
- package/lib/common/protocol.implementation.d.ts +38 -0
- package/lib/common/protocol.implementation.js +22 -0
- package/lib/common/protocol.js +752 -0
- package/lib/common/protocol.linkedEditingRange.d.ts +51 -0
- package/lib/common/protocol.linkedEditingRange.js +19 -0
- package/lib/common/protocol.moniker.d.ts +103 -0
- package/lib/common/protocol.moniker.js +68 -0
- package/lib/common/protocol.progress.d.ts +117 -0
- package/lib/common/protocol.progress.js +34 -0
- package/lib/common/protocol.selectionRange.d.ts +40 -0
- package/lib/common/protocol.selectionRange.js +20 -0
- package/lib/common/protocol.semanticTokens.d.ts +194 -0
- package/lib/common/protocol.semanticTokens.js +51 -0
- package/lib/common/protocol.showDocument.d.ts +71 -0
- package/lib/common/protocol.showDocument.js +22 -0
- package/lib/common/protocol.typeDefinition.d.ts +38 -0
- package/lib/common/protocol.typeDefinition.js +22 -0
- package/lib/common/protocol.workspaceFolders.d.ts +94 -0
- package/lib/common/protocol.workspaceFolders.js +24 -0
- package/lib/common/utils/is.d.ts +9 -0
- package/lib/common/utils/is.js +47 -0
- package/lib/node/main.d.ts +6 -0
- package/lib/node/main.js +25 -0
- package/node.cmd +5 -0
- package/node.d.ts +6 -0
- package/node.js +7 -0
- package/package.json +38 -0
- package/thirdpartynotices.txt +31 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.14.0
|
|
7
|
+
*/
|
|
8
|
+
export interface DeclarationClientCapabilities {
|
|
9
|
+
/**
|
|
10
|
+
* Whether declaration supports dynamic registration. If this is set to `true`
|
|
11
|
+
* the client supports the new `DeclarationRegistrationOptions` return value
|
|
12
|
+
* for the corresponding server capability as well.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The client supports additional metadata in the form of declaration links.
|
|
17
|
+
*/
|
|
18
|
+
linkSupport?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DeclarationOptions extends WorkDoneProgressOptions {
|
|
21
|
+
}
|
|
22
|
+
export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
|
|
23
|
+
}
|
|
24
|
+
export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
28
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
29
|
+
* (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
|
|
30
|
+
* or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
|
|
31
|
+
* to such.
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace DeclarationRequest {
|
|
34
|
+
const method: 'textDocument/declaration';
|
|
35
|
+
const type: ProtocolRequestType<DeclarationParams, Declaration | LocationLink[] | null, Location[] | LocationLink[], void, DeclarationRegistrationOptions>;
|
|
36
|
+
type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DeclarationRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
10
|
+
let __noDynamicImport;
|
|
11
|
+
/**
|
|
12
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
13
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
14
|
+
* (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
|
|
15
|
+
* or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
|
|
16
|
+
* to such.
|
|
17
|
+
*/
|
|
18
|
+
var DeclarationRequest;
|
|
19
|
+
(function (DeclarationRequest) {
|
|
20
|
+
DeclarationRequest.method = 'textDocument/declaration';
|
|
21
|
+
DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
|
|
22
|
+
})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
|
|
23
|
+
//# sourceMappingURL=protocol.declaration.js.map
|
|
@@ -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
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { TextDocumentIdentifier, uinteger, FoldingRange } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
export interface FoldingRangeClientCapabilities {
|
|
6
|
+
/**
|
|
7
|
+
* Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
|
|
8
|
+
* the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
|
|
9
|
+
* capability as well.
|
|
10
|
+
*/
|
|
11
|
+
dynamicRegistration?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
|
|
14
|
+
* hint, servers are free to follow the limit.
|
|
15
|
+
*/
|
|
16
|
+
rangeLimit?: uinteger;
|
|
17
|
+
/**
|
|
18
|
+
* If set, the client signals that it only supports folding complete lines. If set, client will
|
|
19
|
+
* ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
|
|
20
|
+
*/
|
|
21
|
+
lineFoldingOnly?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface FoldingRangeOptions extends WorkDoneProgressOptions {
|
|
24
|
+
}
|
|
25
|
+
export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Enum of known range kinds
|
|
29
|
+
*/
|
|
30
|
+
export declare enum FoldingRangeKind {
|
|
31
|
+
/**
|
|
32
|
+
* Folding range for a comment
|
|
33
|
+
*/
|
|
34
|
+
Comment = "comment",
|
|
35
|
+
/**
|
|
36
|
+
* Folding range for a imports or includes
|
|
37
|
+
*/
|
|
38
|
+
Imports = "imports",
|
|
39
|
+
/**
|
|
40
|
+
* Folding range for a region (e.g. `#region`)
|
|
41
|
+
*/
|
|
42
|
+
Region = "region"
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
|
|
46
|
+
*/
|
|
47
|
+
export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
48
|
+
/**
|
|
49
|
+
* The text document.
|
|
50
|
+
*/
|
|
51
|
+
textDocument: TextDocumentIdentifier;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A request to provide folding ranges in a document. The request's
|
|
55
|
+
* parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
|
|
56
|
+
* response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
|
|
57
|
+
* that resolves to such.
|
|
58
|
+
*/
|
|
59
|
+
export declare namespace FoldingRangeRequest {
|
|
60
|
+
const method: 'textDocument/foldingRange';
|
|
61
|
+
const type: ProtocolRequestType<FoldingRangeParams, FoldingRange[] | null, FoldingRange[], any, FoldingRangeRegistrationOptions>;
|
|
62
|
+
type HandlerSignature = RequestHandler<FoldingRangeParams, FoldingRange[] | null, void>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.FoldingRangeRequest = exports.FoldingRangeKind = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* Enum of known range kinds
|
|
11
|
+
*/
|
|
12
|
+
var FoldingRangeKind;
|
|
13
|
+
(function (FoldingRangeKind) {
|
|
14
|
+
/**
|
|
15
|
+
* Folding range for a comment
|
|
16
|
+
*/
|
|
17
|
+
FoldingRangeKind["Comment"] = "comment";
|
|
18
|
+
/**
|
|
19
|
+
* Folding range for a imports or includes
|
|
20
|
+
*/
|
|
21
|
+
FoldingRangeKind["Imports"] = "imports";
|
|
22
|
+
/**
|
|
23
|
+
* Folding range for a region (e.g. `#region`)
|
|
24
|
+
*/
|
|
25
|
+
FoldingRangeKind["Region"] = "region";
|
|
26
|
+
})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
|
|
27
|
+
/**
|
|
28
|
+
* A request to provide folding ranges in a document. The request's
|
|
29
|
+
* parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
|
|
30
|
+
* response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
|
|
31
|
+
* that resolves to such.
|
|
32
|
+
*/
|
|
33
|
+
var FoldingRangeRequest;
|
|
34
|
+
(function (FoldingRangeRequest) {
|
|
35
|
+
FoldingRangeRequest.method = 'textDocument/foldingRange';
|
|
36
|
+
FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
|
|
37
|
+
})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
|
|
38
|
+
//# sourceMappingURL=protocol.foldingRange.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.6.0
|
|
7
|
+
*/
|
|
8
|
+
export interface ImplementationClientCapabilities {
|
|
9
|
+
/**
|
|
10
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
11
|
+
* the client supports the new `ImplementationRegistrationOptions` return value
|
|
12
|
+
* for the corresponding server capability as well.
|
|
13
|
+
*/
|
|
14
|
+
dynamicRegistration?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The client supports additional metadata in the form of definition links.
|
|
17
|
+
*
|
|
18
|
+
* @since 3.14.0
|
|
19
|
+
*/
|
|
20
|
+
linkSupport?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ImplementationOptions extends WorkDoneProgressOptions {
|
|
23
|
+
}
|
|
24
|
+
export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions {
|
|
25
|
+
}
|
|
26
|
+
export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A request to resolve the implementation locations of a symbol at a given text
|
|
30
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
31
|
+
* (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
|
|
32
|
+
* Thenable that resolves to such.
|
|
33
|
+
*/
|
|
34
|
+
export declare namespace ImplementationRequest {
|
|
35
|
+
const method: 'textDocument/implementation';
|
|
36
|
+
const type: ProtocolRequestType<ImplementationParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, ImplementationRegistrationOptions>;
|
|
37
|
+
type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>;
|
|
38
|
+
}
|
|
@@ -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.ImplementationRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
10
|
+
let __noDynamicImport;
|
|
11
|
+
/**
|
|
12
|
+
* A request to resolve the implementation locations of a symbol at a given text
|
|
13
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
14
|
+
* (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
|
|
15
|
+
* Thenable that resolves to such.
|
|
16
|
+
*/
|
|
17
|
+
var ImplementationRequest;
|
|
18
|
+
(function (ImplementationRequest) {
|
|
19
|
+
ImplementationRequest.method = 'textDocument/implementation';
|
|
20
|
+
ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
|
|
21
|
+
})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
|
|
22
|
+
//# sourceMappingURL=protocol.implementation.js.map
|