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.
Files changed (57) hide show
  1. package/License.txt +11 -0
  2. package/README.md +16 -0
  3. package/browser.d.ts +6 -0
  4. package/browser.js +7 -0
  5. package/lib/browser/main.d.ts +4 -0
  6. package/lib/browser/main.js +25 -0
  7. package/lib/common/api.d.ts +94 -0
  8. package/lib/common/api.js +87 -0
  9. package/lib/common/connection.d.ts +163 -0
  10. package/lib/common/connection.js +16 -0
  11. package/lib/common/messages.d.ts +44 -0
  12. package/lib/common/messages.js +39 -0
  13. package/lib/common/proposed.diagnostic.d.ts +324 -0
  14. package/lib/common/proposed.diagnostic.js +72 -0
  15. package/lib/common/proposed.typeHierarchy.d.ts +83 -0
  16. package/lib/common/proposed.typeHierarchy.js +40 -0
  17. package/lib/common/protocol.callHierarchy.d.ts +83 -0
  18. package/lib/common/protocol.callHierarchy.js +40 -0
  19. package/lib/common/protocol.colorProvider.d.ts +63 -0
  20. package/lib/common/protocol.colorProvider.js +30 -0
  21. package/lib/common/protocol.configuration.d.ts +46 -0
  22. package/lib/common/protocol.configuration.js +22 -0
  23. package/lib/common/protocol.d.ts +2750 -0
  24. package/lib/common/protocol.declaration.d.ts +37 -0
  25. package/lib/common/protocol.declaration.js +23 -0
  26. package/lib/common/protocol.fileOperations.d.ts +293 -0
  27. package/lib/common/protocol.fileOperations.js +92 -0
  28. package/lib/common/protocol.foldingRange.d.ts +63 -0
  29. package/lib/common/protocol.foldingRange.js +38 -0
  30. package/lib/common/protocol.implementation.d.ts +38 -0
  31. package/lib/common/protocol.implementation.js +22 -0
  32. package/lib/common/protocol.js +752 -0
  33. package/lib/common/protocol.linkedEditingRange.d.ts +51 -0
  34. package/lib/common/protocol.linkedEditingRange.js +19 -0
  35. package/lib/common/protocol.moniker.d.ts +103 -0
  36. package/lib/common/protocol.moniker.js +68 -0
  37. package/lib/common/protocol.progress.d.ts +117 -0
  38. package/lib/common/protocol.progress.js +34 -0
  39. package/lib/common/protocol.selectionRange.d.ts +40 -0
  40. package/lib/common/protocol.selectionRange.js +20 -0
  41. package/lib/common/protocol.semanticTokens.d.ts +194 -0
  42. package/lib/common/protocol.semanticTokens.js +51 -0
  43. package/lib/common/protocol.showDocument.d.ts +71 -0
  44. package/lib/common/protocol.showDocument.js +22 -0
  45. package/lib/common/protocol.typeDefinition.d.ts +38 -0
  46. package/lib/common/protocol.typeDefinition.js +22 -0
  47. package/lib/common/protocol.workspaceFolders.d.ts +94 -0
  48. package/lib/common/protocol.workspaceFolders.js +24 -0
  49. package/lib/common/utils/is.d.ts +9 -0
  50. package/lib/common/utils/is.js +47 -0
  51. package/lib/node/main.d.ts +6 -0
  52. package/lib/node/main.js +25 -0
  53. package/node.cmd +5 -0
  54. package/node.d.ts +6 -0
  55. package/node.js +7 -0
  56. package/package.json +38 -0
  57. package/thirdpartynotices.txt +31 -0
@@ -0,0 +1,2750 @@
1
+ import { ProgressToken } from 'vscode-jsonrpc';
2
+ import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
3
+ import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode } from 'vscode-languageserver-types';
4
+ import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation';
5
+ import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition';
6
+ import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders';
7
+ import { ConfigurationRequest, ConfigurationParams, ConfigurationItem, ConfigurationClientCapabilities } from './protocol.configuration';
8
+ import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider';
9
+ import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions } from './protocol.foldingRange';
10
+ import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions, DeclarationParams } from './protocol.declaration';
11
+ import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange';
12
+ import { WorkDoneProgressClientCapabilities, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress';
13
+ import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy';
14
+ import { SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens';
15
+ import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument';
16
+ import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange';
17
+ import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations';
18
+ import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker';
19
+ import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions } from './proposed.typeHierarchy';
20
+ /**
21
+ * A document filter denotes a document by different properties like
22
+ * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
23
+ * its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
24
+ *
25
+ * Glob patterns can have the following syntax:
26
+ * - `*` to match one or more characters in a path segment
27
+ * - `?` to match on one character in a path segment
28
+ * - `**` to match any number of path segments, including none
29
+ * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
30
+ * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
31
+ * - `[!...]` 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`)
32
+ *
33
+ * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
34
+ * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
35
+ */
36
+ export declare type DocumentFilter = {
37
+ /** A language id, like `typescript`. */
38
+ language: string;
39
+ /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
40
+ scheme?: string;
41
+ /** A glob pattern, like `*.{ts,js}`. */
42
+ pattern?: string;
43
+ } | {
44
+ /** A language id, like `typescript`. */
45
+ language?: string;
46
+ /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
47
+ scheme: string;
48
+ /** A glob pattern, like `*.{ts,js}`. */
49
+ pattern?: string;
50
+ } | {
51
+ /** A language id, like `typescript`. */
52
+ language?: string;
53
+ /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
54
+ scheme?: string;
55
+ /** A glob pattern, like `*.{ts,js}`. */
56
+ pattern: string;
57
+ };
58
+ /**
59
+ * The DocumentFilter namespace provides helper functions to work with
60
+ * [DocumentFilter](#DocumentFilter) literals.
61
+ */
62
+ export declare namespace DocumentFilter {
63
+ function is(value: any): value is DocumentFilter;
64
+ }
65
+ /**
66
+ * A document selector is the combination of one or many document filters.
67
+ *
68
+ * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
69
+ *
70
+ * The use of a string as a document filter is deprecated @since 3.16.0.
71
+ */
72
+ export declare type DocumentSelector = (string | DocumentFilter)[];
73
+ /**
74
+ * The DocumentSelector namespace provides helper functions to work with
75
+ * [DocumentSelector](#DocumentSelector)s.
76
+ */
77
+ export declare namespace DocumentSelector {
78
+ function is(value: any[] | undefined | null): value is DocumentSelector;
79
+ }
80
+ /**
81
+ * General parameters to to register for an notification or to register a provider.
82
+ */
83
+ export interface Registration {
84
+ /**
85
+ * The id used to register the request. The id can be used to deregister
86
+ * the request again.
87
+ */
88
+ id: string;
89
+ /**
90
+ * The method to register for.
91
+ */
92
+ method: string;
93
+ /**
94
+ * Options necessary for the registration.
95
+ */
96
+ registerOptions?: any;
97
+ }
98
+ export interface RegistrationParams {
99
+ registrations: Registration[];
100
+ }
101
+ /**
102
+ * The `client/registerCapability` request is sent from the server to the client to register a new capability
103
+ * handler on the client side.
104
+ */
105
+ export declare namespace RegistrationRequest {
106
+ const type: ProtocolRequestType<RegistrationParams, void, never, void, void>;
107
+ }
108
+ /**
109
+ * General parameters to unregister a request or notification.
110
+ */
111
+ export interface Unregistration {
112
+ /**
113
+ * The id used to unregister the request or notification. Usually an id
114
+ * provided during the register request.
115
+ */
116
+ id: string;
117
+ /**
118
+ * The method to unregister for.
119
+ */
120
+ method: string;
121
+ }
122
+ export interface UnregistrationParams {
123
+ unregisterations: Unregistration[];
124
+ }
125
+ /**
126
+ * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
127
+ * handler on the client side.
128
+ */
129
+ export declare namespace UnregistrationRequest {
130
+ const type: ProtocolRequestType<UnregistrationParams, void, never, void, void>;
131
+ }
132
+ export interface WorkDoneProgressParams {
133
+ /**
134
+ * An optional token that a server can use to report work done progress.
135
+ */
136
+ workDoneToken?: ProgressToken;
137
+ }
138
+ export interface PartialResultParams {
139
+ /**
140
+ * An optional token that a server can use to report partial results (e.g. streaming) to
141
+ * the client.
142
+ */
143
+ partialResultToken?: ProgressToken;
144
+ }
145
+ /**
146
+ * A parameter literal used in requests to pass a text document and a position inside that
147
+ * document.
148
+ */
149
+ export interface TextDocumentPositionParams {
150
+ /**
151
+ * The text document.
152
+ */
153
+ textDocument: TextDocumentIdentifier;
154
+ /**
155
+ * The position inside the text document.
156
+ */
157
+ position: Position;
158
+ }
159
+ /**
160
+ * The kind of resource operations supported by the client.
161
+ */
162
+ export declare type ResourceOperationKind = 'create' | 'rename' | 'delete';
163
+ export declare namespace ResourceOperationKind {
164
+ /**
165
+ * Supports creating new files and folders.
166
+ */
167
+ const Create: ResourceOperationKind;
168
+ /**
169
+ * Supports renaming existing files and folders.
170
+ */
171
+ const Rename: ResourceOperationKind;
172
+ /**
173
+ * Supports deleting existing files and folders.
174
+ */
175
+ const Delete: ResourceOperationKind;
176
+ }
177
+ export declare type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional';
178
+ export declare namespace FailureHandlingKind {
179
+ /**
180
+ * Applying the workspace change is simply aborted if one of the changes provided
181
+ * fails. All operations executed before the failing operation stay executed.
182
+ */
183
+ const Abort: FailureHandlingKind;
184
+ /**
185
+ * All operations are executed transactional. That means they either all
186
+ * succeed or no changes at all are applied to the workspace.
187
+ */
188
+ const Transactional: FailureHandlingKind;
189
+ /**
190
+ * If the workspace edit contains only textual file changes they are executed transactional.
191
+ * If resource changes (create, rename or delete file) are part of the change the failure
192
+ * handling strategy is abort.
193
+ */
194
+ const TextOnlyTransactional: FailureHandlingKind;
195
+ /**
196
+ * The client tries to undo the operations already executed. But there is no
197
+ * guarantee that this is succeeding.
198
+ */
199
+ const Undo: FailureHandlingKind;
200
+ }
201
+ /**
202
+ * Workspace specific client capabilities.
203
+ */
204
+ export interface WorkspaceClientCapabilities {
205
+ /**
206
+ * The client supports applying batch edits
207
+ * to the workspace by supporting the request
208
+ * 'workspace/applyEdit'
209
+ */
210
+ applyEdit?: boolean;
211
+ /**
212
+ * Capabilities specific to `WorkspaceEdit`s
213
+ */
214
+ workspaceEdit?: WorkspaceEditClientCapabilities;
215
+ /**
216
+ * Capabilities specific to the `workspace/didChangeConfiguration` notification.
217
+ */
218
+ didChangeConfiguration?: DidChangeConfigurationClientCapabilities;
219
+ /**
220
+ * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
221
+ */
222
+ didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities;
223
+ /**
224
+ * Capabilities specific to the `workspace/symbol` request.
225
+ */
226
+ symbol?: WorkspaceSymbolClientCapabilities;
227
+ /**
228
+ * Capabilities specific to the `workspace/executeCommand` request.
229
+ */
230
+ executeCommand?: ExecuteCommandClientCapabilities;
231
+ /**
232
+ * Capabilities specific to the semantic token requests scoped to the
233
+ * workspace.
234
+ *
235
+ * @since 3.16.0.
236
+ */
237
+ semanticTokens?: SemanticTokensWorkspaceClientCapabilities;
238
+ /**
239
+ * Capabilities specific to the code lens requests scoped to the
240
+ * workspace.
241
+ *
242
+ * @since 3.16.0.
243
+ */
244
+ codeLens?: CodeLensWorkspaceClientCapabilities;
245
+ /**
246
+ * The client has support for file notifications/requests for user operations on files.
247
+ *
248
+ * Since 3.16.0
249
+ */
250
+ fileOperations?: FileOperationClientCapabilities;
251
+ }
252
+ /**
253
+ * Text document specific client capabilities.
254
+ */
255
+ export interface TextDocumentClientCapabilities {
256
+ /**
257
+ * Defines which synchronization capabilities the client supports.
258
+ */
259
+ synchronization?: TextDocumentSyncClientCapabilities;
260
+ /**
261
+ * Capabilities specific to the `textDocument/completion`
262
+ */
263
+ completion?: CompletionClientCapabilities;
264
+ /**
265
+ * Capabilities specific to the `textDocument/hover`
266
+ */
267
+ hover?: HoverClientCapabilities;
268
+ /**
269
+ * Capabilities specific to the `textDocument/signatureHelp`
270
+ */
271
+ signatureHelp?: SignatureHelpClientCapabilities;
272
+ /**
273
+ * Capabilities specific to the `textDocument/declaration`
274
+ *
275
+ * @since 3.14.0
276
+ */
277
+ declaration?: DeclarationClientCapabilities;
278
+ /**
279
+ * Capabilities specific to the `textDocument/definition`
280
+ */
281
+ definition?: DefinitionClientCapabilities;
282
+ /**
283
+ * Capabilities specific to the `textDocument/typeDefinition`
284
+ *
285
+ * @since 3.6.0
286
+ */
287
+ typeDefinition?: TypeDefinitionClientCapabilities;
288
+ /**
289
+ * Capabilities specific to the `textDocument/implementation`
290
+ *
291
+ * @since 3.6.0
292
+ */
293
+ implementation?: ImplementationClientCapabilities;
294
+ /**
295
+ * Capabilities specific to the `textDocument/references`
296
+ */
297
+ references?: ReferenceClientCapabilities;
298
+ /**
299
+ * Capabilities specific to the `textDocument/documentHighlight`
300
+ */
301
+ documentHighlight?: DocumentHighlightClientCapabilities;
302
+ /**
303
+ * Capabilities specific to the `textDocument/documentSymbol`
304
+ */
305
+ documentSymbol?: DocumentSymbolClientCapabilities;
306
+ /**
307
+ * Capabilities specific to the `textDocument/codeAction`
308
+ */
309
+ codeAction?: CodeActionClientCapabilities;
310
+ /**
311
+ * Capabilities specific to the `textDocument/codeLens`
312
+ */
313
+ codeLens?: CodeLensClientCapabilities;
314
+ /**
315
+ * Capabilities specific to the `textDocument/documentLink`
316
+ */
317
+ documentLink?: DocumentLinkClientCapabilities;
318
+ /**
319
+ * Capabilities specific to the `textDocument/documentColor`
320
+ */
321
+ colorProvider?: DocumentColorClientCapabilities;
322
+ /**
323
+ * Capabilities specific to the `textDocument/formatting`
324
+ */
325
+ formatting?: DocumentFormattingClientCapabilities;
326
+ /**
327
+ * Capabilities specific to the `textDocument/rangeFormatting`
328
+ */
329
+ rangeFormatting?: DocumentRangeFormattingClientCapabilities;
330
+ /**
331
+ * Capabilities specific to the `textDocument/onTypeFormatting`
332
+ */
333
+ onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities;
334
+ /**
335
+ * Capabilities specific to the `textDocument/rename`
336
+ */
337
+ rename?: RenameClientCapabilities;
338
+ /**
339
+ * Capabilities specific to `textDocument/foldingRange` request.
340
+ *
341
+ * @since 3.10.0
342
+ */
343
+ foldingRange?: FoldingRangeClientCapabilities;
344
+ /**
345
+ * Capabilities specific to `textDocument/selectionRange` request.
346
+ *
347
+ * @since 3.15.0
348
+ */
349
+ selectionRange?: SelectionRangeClientCapabilities;
350
+ /**
351
+ * Capabilities specific to `textDocument/publishDiagnostics` notification.
352
+ */
353
+ publishDiagnostics?: PublishDiagnosticsClientCapabilities;
354
+ /**
355
+ * Capabilities specific to the various call hierarchy request.
356
+ *
357
+ * @since 3.16.0
358
+ */
359
+ callHierarchy?: CallHierarchyClientCapabilities;
360
+ /**
361
+ * Capabilities specific to the various semantic token request.
362
+ *
363
+ * @since 3.16.0
364
+ */
365
+ semanticTokens?: SemanticTokensClientCapabilities;
366
+ /**
367
+ * Capabilities specific to the linked editing range request.
368
+ *
369
+ * @since 3.16.0
370
+ */
371
+ linkedEditingRange?: LinkedEditingRangeClientCapabilities;
372
+ /**
373
+ * Client capabilities specific to the moniker request.
374
+ *
375
+ * @since 3.16.0
376
+ */
377
+ moniker?: MonikerClientCapabilities;
378
+ /**
379
+ * Capabilities specific to the various type hierarchy requests.
380
+ *
381
+ * @since 3.17.0 - proposed state
382
+ */
383
+ typeHierarchy?: TypeHierarchyClientCapabilities;
384
+ }
385
+ export interface WindowClientCapabilities {
386
+ /**
387
+ * Whether client supports handling progress notifications. If set
388
+ * servers are allowed to report in `workDoneProgress` property in the
389
+ * request specific server capabilities.
390
+ *
391
+ * @since 3.15.0
392
+ */
393
+ workDoneProgress?: boolean;
394
+ /**
395
+ * Capabilities specific to the showMessage request.
396
+ *
397
+ * @since 3.16.0
398
+ */
399
+ showMessage?: ShowMessageRequestClientCapabilities;
400
+ /**
401
+ * Capabilities specific to the showDocument request.
402
+ *
403
+ * @since 3.16.0
404
+ */
405
+ showDocument?: ShowDocumentClientCapabilities;
406
+ }
407
+ /**
408
+ * Client capabilities specific to regular expressions.
409
+ *
410
+ * @since 3.16.0
411
+ */
412
+ export interface RegularExpressionsClientCapabilities {
413
+ /**
414
+ * The engine's name.
415
+ */
416
+ engine: string;
417
+ /**
418
+ * The engine's version.
419
+ */
420
+ version?: string;
421
+ }
422
+ /**
423
+ * Client capabilities specific to the used markdown parser.
424
+ *
425
+ * @since 3.16.0
426
+ */
427
+ export interface MarkdownClientCapabilities {
428
+ /**
429
+ * The name of the parser.
430
+ */
431
+ parser: string;
432
+ /**
433
+ * The version of the parser.
434
+ */
435
+ version?: string;
436
+ }
437
+ /**
438
+ * General client capabilities.
439
+ *
440
+ * @since 3.16.0
441
+ */
442
+ export interface GeneralClientCapabilities {
443
+ /**
444
+ * Client capability that signals how the client
445
+ * handles stale requests (e.g. a request
446
+ * for which the client will not process the response
447
+ * anymore since the information is outdated).
448
+ *
449
+ * @since 3.17.0
450
+ */
451
+ staleRequestSupport?: {
452
+ /**
453
+ * The client will actively cancel the request.
454
+ */
455
+ cancel: boolean;
456
+ /**
457
+ * The list of requests for which the client
458
+ * will retry the request if it receives a
459
+ * response with error code `ContentModified``
460
+ */
461
+ retryOnContentModified: string[];
462
+ };
463
+ /**
464
+ * Client capabilities specific to regular expressions.
465
+ *
466
+ * @since 3.16.0
467
+ */
468
+ regularExpressions?: RegularExpressionsClientCapabilities;
469
+ /**
470
+ * Client capabilities specific to the client's markdown parser.
471
+ *
472
+ * @since 3.16.0
473
+ */
474
+ markdown?: MarkdownClientCapabilities;
475
+ }
476
+ /**
477
+ * Defines the capabilities provided by the client.
478
+ */
479
+ export interface _ClientCapabilities {
480
+ /**
481
+ * Workspace specific client capabilities.
482
+ */
483
+ workspace?: WorkspaceClientCapabilities;
484
+ /**
485
+ * Text document specific client capabilities.
486
+ */
487
+ textDocument?: TextDocumentClientCapabilities;
488
+ /**
489
+ * Window specific client capabilities.
490
+ */
491
+ window?: WindowClientCapabilities;
492
+ /**
493
+ * General client capabilities.
494
+ *
495
+ * @since 3.16.0
496
+ */
497
+ general?: GeneralClientCapabilities;
498
+ /**
499
+ * Experimental client capabilities.
500
+ */
501
+ experimental?: object;
502
+ }
503
+ export declare type ClientCapabilities = _ClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & WorkDoneProgressClientCapabilities;
504
+ /**
505
+ * Static registration options to be returned in the initialize
506
+ * request.
507
+ */
508
+ export interface StaticRegistrationOptions {
509
+ /**
510
+ * The id used to register the request. The id can be used to deregister
511
+ * the request again. See also Registration#id.
512
+ */
513
+ id?: string;
514
+ }
515
+ /**
516
+ * The StaticRegistrationOptions namespace provides helper functions to work with
517
+ * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
518
+ */
519
+ export declare namespace StaticRegistrationOptions {
520
+ function hasId(value: object): value is {
521
+ id: string;
522
+ };
523
+ }
524
+ /**
525
+ * General text document registration options.
526
+ */
527
+ export interface TextDocumentRegistrationOptions {
528
+ /**
529
+ * A document selector to identify the scope of the registration. If set to null
530
+ * the document selector provided on the client side will be used.
531
+ */
532
+ documentSelector: DocumentSelector | null;
533
+ }
534
+ /**
535
+ * The TextDocumentRegistrationOptions namespace provides helper functions to work with
536
+ * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
537
+ */
538
+ export declare namespace TextDocumentRegistrationOptions {
539
+ function is(value: any): value is TextDocumentRegistrationOptions;
540
+ }
541
+ /**
542
+ * Save options.
543
+ */
544
+ export interface SaveOptions {
545
+ /**
546
+ * The client is supposed to include the content on save.
547
+ */
548
+ includeText?: boolean;
549
+ }
550
+ export interface WorkDoneProgressOptions {
551
+ workDoneProgress?: boolean;
552
+ }
553
+ /**
554
+ * The WorkDoneProgressOptions namespace provides helper functions to work with
555
+ * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
556
+ */
557
+ export declare namespace WorkDoneProgressOptions {
558
+ function is(value: any): value is WorkDoneProgressOptions;
559
+ function hasWorkDoneProgress(value: any): value is {
560
+ workDoneProgress: boolean;
561
+ };
562
+ }
563
+ /**
564
+ * Defines the capabilities provided by a language
565
+ * server.
566
+ */
567
+ export interface _ServerCapabilities<T = any> {
568
+ /**
569
+ * Defines how text documents are synced. Is either a detailed structure defining each notification or
570
+ * for backwards compatibility the TextDocumentSyncKind number.
571
+ */
572
+ textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
573
+ /**
574
+ * The server provides completion support.
575
+ */
576
+ completionProvider?: CompletionOptions;
577
+ /**
578
+ * The server provides hover support.
579
+ */
580
+ hoverProvider?: boolean | HoverOptions;
581
+ /**
582
+ * The server provides signature help support.
583
+ */
584
+ signatureHelpProvider?: SignatureHelpOptions;
585
+ /**
586
+ * The server provides Goto Declaration support.
587
+ */
588
+ declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions;
589
+ /**
590
+ * The server provides goto definition support.
591
+ */
592
+ definitionProvider?: boolean | DefinitionOptions;
593
+ /**
594
+ * The server provides Goto Type Definition support.
595
+ */
596
+ typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions;
597
+ /**
598
+ * The server provides Goto Implementation support.
599
+ */
600
+ implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions;
601
+ /**
602
+ * The server provides find references support.
603
+ */
604
+ referencesProvider?: boolean | ReferenceOptions;
605
+ /**
606
+ * The server provides document highlight support.
607
+ */
608
+ documentHighlightProvider?: boolean | DocumentHighlightOptions;
609
+ /**
610
+ * The server provides document symbol support.
611
+ */
612
+ documentSymbolProvider?: boolean | DocumentSymbolOptions;
613
+ /**
614
+ * The server provides code actions. CodeActionOptions may only be
615
+ * specified if the client states that it supports
616
+ * `codeActionLiteralSupport` in its initial `initialize` request.
617
+ */
618
+ codeActionProvider?: boolean | CodeActionOptions;
619
+ /**
620
+ * The server provides code lens.
621
+ */
622
+ codeLensProvider?: CodeLensOptions;
623
+ /**
624
+ * The server provides document link support.
625
+ */
626
+ documentLinkProvider?: DocumentLinkOptions;
627
+ /**
628
+ * The server provides color provider support.
629
+ */
630
+ colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;
631
+ /**
632
+ * The server provides workspace symbol support.
633
+ */
634
+ workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions;
635
+ /**
636
+ * The server provides document formatting.
637
+ */
638
+ documentFormattingProvider?: boolean | DocumentFormattingOptions;
639
+ /**
640
+ * The server provides document range formatting.
641
+ */
642
+ documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions;
643
+ /**
644
+ * The server provides document formatting on typing.
645
+ */
646
+ documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions;
647
+ /**
648
+ * The server provides rename support. RenameOptions may only be
649
+ * specified if the client states that it supports
650
+ * `prepareSupport` in its initial `initialize` request.
651
+ */
652
+ renameProvider?: boolean | RenameOptions;
653
+ /**
654
+ * The server provides folding provider support.
655
+ */
656
+ foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions;
657
+ /**
658
+ * The server provides selection range support.
659
+ */
660
+ selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions;
661
+ /**
662
+ * The server provides execute command support.
663
+ */
664
+ executeCommandProvider?: ExecuteCommandOptions;
665
+ /**
666
+ * The server provides call hierarchy support.
667
+ *
668
+ * @since 3.16.0
669
+ */
670
+ callHierarchyProvider?: boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions;
671
+ /**
672
+ * The server provides linked editing range support.
673
+ *
674
+ * @since 3.16.0
675
+ */
676
+ linkedEditingRangeProvider?: boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions;
677
+ /**
678
+ * The server provides semantic tokens support.
679
+ *
680
+ * @since 3.16.0
681
+ */
682
+ semanticTokensProvider?: SemanticTokensOptions | SemanticTokensRegistrationOptions;
683
+ /**
684
+ * Window specific server capabilities.
685
+ */
686
+ workspace?: {
687
+ /**
688
+ * The server is interested in notifications/requests for operations on files.
689
+ *
690
+ * @since 3.16.0
691
+ */
692
+ fileOperations?: FileOperationOptions;
693
+ };
694
+ /**
695
+ * The server provides moniker support.
696
+ *
697
+ * @since 3.16.0
698
+ */
699
+ monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions;
700
+ /**
701
+ * The server provides type hierarchy support.
702
+ *
703
+ * @since 3.17.0 - proposed state
704
+ */
705
+ typeHierarchyProvider?: boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions;
706
+ /**
707
+ * Experimental server capabilities.
708
+ */
709
+ experimental?: T;
710
+ }
711
+ export declare type ServerCapabilities<T = any> = _ServerCapabilities<T> & WorkspaceFoldersServerCapabilities;
712
+ /**
713
+ * The initialize request is sent from the client to the server.
714
+ * It is sent once as the request after starting up the server.
715
+ * The requests parameter is of type [InitializeParams](#InitializeParams)
716
+ * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
717
+ * resolves to such.
718
+ */
719
+ export declare namespace InitializeRequest {
720
+ const type: ProtocolRequestType<_InitializeParams & WorkspaceFoldersInitializeParams & WorkDoneProgressParams, InitializeResult<any>, never, InitializeError, void>;
721
+ }
722
+ /**
723
+ * The initialize parameters
724
+ */
725
+ export interface _InitializeParams extends WorkDoneProgressParams {
726
+ /**
727
+ * The process Id of the parent process that started
728
+ * the server.
729
+ */
730
+ processId: integer | null;
731
+ /**
732
+ * Information about the client
733
+ *
734
+ * @since 3.15.0
735
+ */
736
+ clientInfo?: {
737
+ /**
738
+ * The name of the client as defined by the client.
739
+ */
740
+ name: string;
741
+ /**
742
+ * The client's version as defined by the client.
743
+ */
744
+ version?: string;
745
+ };
746
+ /**
747
+ * The locale the client is currently showing the user interface
748
+ * in. This must not necessarily be the locale of the operating
749
+ * system.
750
+ *
751
+ * Uses IETF language tags as the value's syntax
752
+ * (See https://en.wikipedia.org/wiki/IETF_language_tag)
753
+ *
754
+ * @since 3.16.0
755
+ */
756
+ locale?: string;
757
+ /**
758
+ * The rootPath of the workspace. Is null
759
+ * if no folder is open.
760
+ *
761
+ * @deprecated in favour of rootUri.
762
+ */
763
+ rootPath?: string | null;
764
+ /**
765
+ * The rootUri of the workspace. Is null if no
766
+ * folder is open. If both `rootPath` and `rootUri` are set
767
+ * `rootUri` wins.
768
+ *
769
+ * @deprecated in favour of workspaceFolders.
770
+ */
771
+ rootUri: DocumentUri | null;
772
+ /**
773
+ * The capabilities provided by the client (editor or tool)
774
+ */
775
+ capabilities: ClientCapabilities;
776
+ /**
777
+ * User provided initialization options.
778
+ */
779
+ initializationOptions?: any;
780
+ /**
781
+ * The initial trace setting. If omitted trace is disabled ('off').
782
+ */
783
+ trace?: 'off' | 'messages' | 'verbose';
784
+ }
785
+ export declare type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams;
786
+ /**
787
+ * The result returned from an initialize request.
788
+ */
789
+ export interface InitializeResult<T = any> {
790
+ /**
791
+ * The capabilities the language server provides.
792
+ */
793
+ capabilities: ServerCapabilities<T>;
794
+ /**
795
+ * Information about the server.
796
+ *
797
+ * @since 3.15.0
798
+ */
799
+ serverInfo?: {
800
+ /**
801
+ * The name of the server as defined by the server.
802
+ */
803
+ name: string;
804
+ /**
805
+ * The server's version as defined by the server.
806
+ */
807
+ version?: string;
808
+ };
809
+ /**
810
+ * Custom initialization results.
811
+ */
812
+ [custom: string]: any;
813
+ }
814
+ /**
815
+ * Known error codes for an `InitializeError`;
816
+ */
817
+ export declare namespace InitializeError {
818
+ /**
819
+ * If the protocol version provided by the client can't be handled by the server.
820
+ * @deprecated This initialize error got replaced by client capabilities. There is
821
+ * no version handshake in version 3.0x
822
+ */
823
+ const unknownProtocolVersion: 1;
824
+ }
825
+ /**
826
+ * The data type of the ResponseError if the
827
+ * initialize request fails.
828
+ */
829
+ export interface InitializeError {
830
+ /**
831
+ * Indicates whether the client execute the following retry logic:
832
+ * (1) show the message provided by the ResponseError to the user
833
+ * (2) user selects retry or cancel
834
+ * (3) if user selected retry the initialize method is sent again.
835
+ */
836
+ retry: boolean;
837
+ }
838
+ export interface InitializedParams {
839
+ }
840
+ /**
841
+ * The initialized notification is sent from the client to the
842
+ * server after the client is fully initialized and the server
843
+ * is allowed to send requests from the server to the client.
844
+ */
845
+ export declare namespace InitializedNotification {
846
+ const type: ProtocolNotificationType<InitializedParams, void>;
847
+ }
848
+ /**
849
+ * A shutdown request is sent from the client to the server.
850
+ * It is sent once when the client decides to shutdown the
851
+ * server. The only notification that is sent after a shutdown request
852
+ * is the exit event.
853
+ */
854
+ export declare namespace ShutdownRequest {
855
+ const type: ProtocolRequestType0<void, never, void, void>;
856
+ }
857
+ /**
858
+ * The exit event is sent from the client to the server to
859
+ * ask the server to exit its process.
860
+ */
861
+ export declare namespace ExitNotification {
862
+ const type: ProtocolNotificationType0<void>;
863
+ }
864
+ export interface DidChangeConfigurationClientCapabilities {
865
+ /**
866
+ * Did change configuration notification supports dynamic registration.
867
+ */
868
+ dynamicRegistration?: boolean;
869
+ }
870
+ /**
871
+ * The configuration change notification is sent from the client to the server
872
+ * when the client's configuration has changed. The notification contains
873
+ * the changed configuration as defined by the language client.
874
+ */
875
+ export declare namespace DidChangeConfigurationNotification {
876
+ const type: ProtocolNotificationType<DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions>;
877
+ }
878
+ export interface DidChangeConfigurationRegistrationOptions {
879
+ section?: string | string[];
880
+ }
881
+ /**
882
+ * The parameters of a change configuration notification.
883
+ */
884
+ export interface DidChangeConfigurationParams {
885
+ /**
886
+ * The actual changed settings
887
+ */
888
+ settings: any;
889
+ }
890
+ /**
891
+ * The message type
892
+ */
893
+ export declare namespace MessageType {
894
+ /**
895
+ * An error message.
896
+ */
897
+ const Error = 1;
898
+ /**
899
+ * A warning message.
900
+ */
901
+ const Warning = 2;
902
+ /**
903
+ * An information message.
904
+ */
905
+ const Info = 3;
906
+ /**
907
+ * A log message.
908
+ */
909
+ const Log = 4;
910
+ }
911
+ export declare type MessageType = 1 | 2 | 3 | 4;
912
+ /**
913
+ * The parameters of a notification message.
914
+ */
915
+ export interface ShowMessageParams {
916
+ /**
917
+ * The message type. See {@link MessageType}
918
+ */
919
+ type: MessageType;
920
+ /**
921
+ * The actual message
922
+ */
923
+ message: string;
924
+ }
925
+ /**
926
+ * The show message notification is sent from a server to a client to ask
927
+ * the client to display a particular message in the user interface.
928
+ */
929
+ export declare namespace ShowMessageNotification {
930
+ const type: ProtocolNotificationType<ShowMessageParams, void>;
931
+ }
932
+ /**
933
+ * Show message request client capabilities
934
+ */
935
+ export interface ShowMessageRequestClientCapabilities {
936
+ /**
937
+ * Capabilities specific to the `MessageActionItem` type.
938
+ */
939
+ messageActionItem?: {
940
+ /**
941
+ * Whether the client supports additional attributes which
942
+ * are preserved and send back to the server in the
943
+ * request's response.
944
+ */
945
+ additionalPropertiesSupport?: boolean;
946
+ };
947
+ }
948
+ export interface MessageActionItem {
949
+ /**
950
+ * A short title like 'Retry', 'Open Log' etc.
951
+ */
952
+ title: string;
953
+ /**
954
+ * Additional attributes that the client preserves and
955
+ * sends back to the server. This depends on the client
956
+ * capability window.messageActionItem.additionalPropertiesSupport
957
+ */
958
+ [key: string]: string | boolean | integer | object;
959
+ }
960
+ export interface ShowMessageRequestParams {
961
+ /**
962
+ * The message type. See {@link MessageType}
963
+ */
964
+ type: MessageType;
965
+ /**
966
+ * The actual message
967
+ */
968
+ message: string;
969
+ /**
970
+ * The message action items to present.
971
+ */
972
+ actions?: MessageActionItem[];
973
+ }
974
+ /**
975
+ * The show message request is sent from the server to the client to show a message
976
+ * and a set of options actions to the user.
977
+ */
978
+ export declare namespace ShowMessageRequest {
979
+ const type: ProtocolRequestType<ShowMessageRequestParams, MessageActionItem | null, never, void, void>;
980
+ }
981
+ /**
982
+ * The log message notification is sent from the server to the client to ask
983
+ * the client to log a particular message.
984
+ */
985
+ export declare namespace LogMessageNotification {
986
+ const type: ProtocolNotificationType<LogMessageParams, void>;
987
+ }
988
+ /**
989
+ * The log message parameters.
990
+ */
991
+ export interface LogMessageParams {
992
+ /**
993
+ * The message type. See {@link MessageType}
994
+ */
995
+ type: MessageType;
996
+ /**
997
+ * The actual message
998
+ */
999
+ message: string;
1000
+ }
1001
+ /**
1002
+ * The telemetry event notification is sent from the server to the client to ask
1003
+ * the client to log telemetry data.
1004
+ */
1005
+ export declare namespace TelemetryEventNotification {
1006
+ const type: ProtocolNotificationType<any, void>;
1007
+ }
1008
+ export interface TextDocumentSyncClientCapabilities {
1009
+ /**
1010
+ * Whether text document synchronization supports dynamic registration.
1011
+ */
1012
+ dynamicRegistration?: boolean;
1013
+ /**
1014
+ * The client supports sending will save notifications.
1015
+ */
1016
+ willSave?: boolean;
1017
+ /**
1018
+ * The client supports sending a will save request and
1019
+ * waits for a response providing text edits which will
1020
+ * be applied to the document before it is saved.
1021
+ */
1022
+ willSaveWaitUntil?: boolean;
1023
+ /**
1024
+ * The client supports did save notifications.
1025
+ */
1026
+ didSave?: boolean;
1027
+ }
1028
+ /**
1029
+ * Defines how the host (editor) should sync
1030
+ * document changes to the language server.
1031
+ */
1032
+ export declare namespace TextDocumentSyncKind {
1033
+ /**
1034
+ * Documents should not be synced at all.
1035
+ */
1036
+ const None = 0;
1037
+ /**
1038
+ * Documents are synced by always sending the full content
1039
+ * of the document.
1040
+ */
1041
+ const Full = 1;
1042
+ /**
1043
+ * Documents are synced by sending the full content on open.
1044
+ * After that only incremental updates to the document are
1045
+ * send.
1046
+ */
1047
+ const Incremental = 2;
1048
+ }
1049
+ export declare type TextDocumentSyncKind = 0 | 1 | 2;
1050
+ export interface TextDocumentSyncOptions {
1051
+ /**
1052
+ * Open and close notifications are sent to the server. If omitted open close notification should not
1053
+ * be sent.
1054
+ */
1055
+ openClose?: boolean;
1056
+ /**
1057
+ * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
1058
+ * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
1059
+ */
1060
+ change?: TextDocumentSyncKind;
1061
+ /**
1062
+ * If present will save notifications are sent to the server. If omitted the notification should not be
1063
+ * sent.
1064
+ */
1065
+ willSave?: boolean;
1066
+ /**
1067
+ * If present will save wait until requests are sent to the server. If omitted the request should not be
1068
+ * sent.
1069
+ */
1070
+ willSaveWaitUntil?: boolean;
1071
+ /**
1072
+ * If present save notifications are sent to the server. If omitted the notification should not be
1073
+ * sent.
1074
+ */
1075
+ save?: boolean | SaveOptions;
1076
+ }
1077
+ /**
1078
+ * The parameters send in a open text document notification
1079
+ */
1080
+ export interface DidOpenTextDocumentParams {
1081
+ /**
1082
+ * The document that was opened.
1083
+ */
1084
+ textDocument: TextDocumentItem;
1085
+ }
1086
+ /**
1087
+ * The document open notification is sent from the client to the server to signal
1088
+ * newly opened text documents. The document's truth is now managed by the client
1089
+ * and the server must not try to read the document's truth using the document's
1090
+ * uri. Open in this sense means it is managed by the client. It doesn't necessarily
1091
+ * mean that its content is presented in an editor. An open notification must not
1092
+ * be sent more than once without a corresponding close notification send before.
1093
+ * This means open and close notification must be balanced and the max open count
1094
+ * is one.
1095
+ */
1096
+ export declare namespace DidOpenTextDocumentNotification {
1097
+ const method: 'textDocument/didOpen';
1098
+ const type: ProtocolNotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
1099
+ }
1100
+ /**
1101
+ * An event describing a change to a text document. If range and rangeLength are omitted
1102
+ * the new text is considered to be the full content of the document.
1103
+ */
1104
+ export declare type TextDocumentContentChangeEvent = {
1105
+ /**
1106
+ * The range of the document that changed.
1107
+ */
1108
+ range: Range;
1109
+ /**
1110
+ * The optional length of the range that got replaced.
1111
+ *
1112
+ * @deprecated use range instead.
1113
+ */
1114
+ rangeLength?: uinteger;
1115
+ /**
1116
+ * The new text for the provided range.
1117
+ */
1118
+ text: string;
1119
+ } | {
1120
+ /**
1121
+ * The new text of the whole document.
1122
+ */
1123
+ text: string;
1124
+ };
1125
+ export declare namespace TextDocumentContentChangeEvent {
1126
+ /**
1127
+ * Checks whether the information describes a delta event.
1128
+ */
1129
+ function isIncremental(event: TextDocumentContentChangeEvent): event is {
1130
+ range: Range;
1131
+ rangeLength?: uinteger;
1132
+ text: string;
1133
+ };
1134
+ /**
1135
+ * Checks whether the information describes a full replacement event.
1136
+ */
1137
+ function isFull(event: TextDocumentContentChangeEvent): event is {
1138
+ text: string;
1139
+ };
1140
+ }
1141
+ /**
1142
+ * The change text document notification's parameters.
1143
+ */
1144
+ export interface DidChangeTextDocumentParams {
1145
+ /**
1146
+ * The document that did change. The version number points
1147
+ * to the version after all provided content changes have
1148
+ * been applied.
1149
+ */
1150
+ textDocument: VersionedTextDocumentIdentifier;
1151
+ /**
1152
+ * The actual content changes. The content changes describe single state changes
1153
+ * to the document. So if there are two content changes c1 (at array index 0) and
1154
+ * c2 (at array index 1) for a document in state S then c1 moves the document from
1155
+ * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
1156
+ * on the state S'.
1157
+ *
1158
+ * To mirror the content of a document using change events use the following approach:
1159
+ * - start with the same initial content
1160
+ * - apply the 'textDocument/didChange' notifications in the order you receive them.
1161
+ * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
1162
+ * you receive them.
1163
+ */
1164
+ contentChanges: TextDocumentContentChangeEvent[];
1165
+ }
1166
+ /**
1167
+ * Describe options to be used when registered for text document change events.
1168
+ */
1169
+ export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
1170
+ /**
1171
+ * How documents are synced to the server.
1172
+ */
1173
+ syncKind: TextDocumentSyncKind;
1174
+ }
1175
+ /**
1176
+ * The document change notification is sent from the client to the server to signal
1177
+ * changes to a text document.
1178
+ */
1179
+ export declare namespace DidChangeTextDocumentNotification {
1180
+ const method: 'textDocument/didChange';
1181
+ const type: ProtocolNotificationType<DidChangeTextDocumentParams, TextDocumentChangeRegistrationOptions>;
1182
+ }
1183
+ /**
1184
+ * The parameters send in a close text document notification
1185
+ */
1186
+ export interface DidCloseTextDocumentParams {
1187
+ /**
1188
+ * The document that was closed.
1189
+ */
1190
+ textDocument: TextDocumentIdentifier;
1191
+ }
1192
+ /**
1193
+ * The document close notification is sent from the client to the server when
1194
+ * the document got closed in the client. The document's truth now exists where
1195
+ * the document's uri points to (e.g. if the document's uri is a file uri the
1196
+ * truth now exists on disk). As with the open notification the close notification
1197
+ * is about managing the document's content. Receiving a close notification
1198
+ * doesn't mean that the document was open in an editor before. A close
1199
+ * notification requires a previous open notification to be sent.
1200
+ */
1201
+ export declare namespace DidCloseTextDocumentNotification {
1202
+ const method: 'textDocument/didClose';
1203
+ const type: ProtocolNotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>;
1204
+ }
1205
+ /**
1206
+ * The parameters send in a save text document notification
1207
+ */
1208
+ export interface DidSaveTextDocumentParams {
1209
+ /**
1210
+ * The document that was closed.
1211
+ */
1212
+ textDocument: TextDocumentIdentifier;
1213
+ /**
1214
+ * Optional the content when saved. Depends on the includeText value
1215
+ * when the save notification was requested.
1216
+ */
1217
+ text?: string;
1218
+ }
1219
+ /**
1220
+ * Save registration options.
1221
+ */
1222
+ export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions {
1223
+ }
1224
+ /**
1225
+ * The document save notification is sent from the client to the server when
1226
+ * the document got saved in the client.
1227
+ */
1228
+ export declare namespace DidSaveTextDocumentNotification {
1229
+ const method: 'textDocument/didSave';
1230
+ const type: ProtocolNotificationType<DidSaveTextDocumentParams, TextDocumentSaveRegistrationOptions>;
1231
+ }
1232
+ /**
1233
+ * Represents reasons why a text document is saved.
1234
+ */
1235
+ export declare namespace TextDocumentSaveReason {
1236
+ /**
1237
+ * Manually triggered, e.g. by the user pressing save, by starting debugging,
1238
+ * or by an API call.
1239
+ */
1240
+ const Manual: 1;
1241
+ /**
1242
+ * Automatic after a delay.
1243
+ */
1244
+ const AfterDelay: 2;
1245
+ /**
1246
+ * When the editor lost focus.
1247
+ */
1248
+ const FocusOut: 3;
1249
+ }
1250
+ export declare type TextDocumentSaveReason = 1 | 2 | 3;
1251
+ /**
1252
+ * The parameters send in a will save text document notification.
1253
+ */
1254
+ export interface WillSaveTextDocumentParams {
1255
+ /**
1256
+ * The document that will be saved.
1257
+ */
1258
+ textDocument: TextDocumentIdentifier;
1259
+ /**
1260
+ * The 'TextDocumentSaveReason'.
1261
+ */
1262
+ reason: TextDocumentSaveReason;
1263
+ }
1264
+ /**
1265
+ * A document will save notification is sent from the client to the server before
1266
+ * the document is actually saved.
1267
+ */
1268
+ export declare namespace WillSaveTextDocumentNotification {
1269
+ const method: 'textDocument/willSave';
1270
+ const type: ProtocolNotificationType<WillSaveTextDocumentParams, TextDocumentRegistrationOptions>;
1271
+ }
1272
+ /**
1273
+ * A document will save request is sent from the client to the server before
1274
+ * the document is actually saved. The request can return an array of TextEdits
1275
+ * which will be applied to the text document before it is saved. Please note that
1276
+ * clients might drop results if computing the text edits took too long or if a
1277
+ * server constantly fails on this request. This is done to keep the save fast and
1278
+ * reliable.
1279
+ */
1280
+ export declare namespace WillSaveTextDocumentWaitUntilRequest {
1281
+ const method: 'textDocument/willSaveWaitUntil';
1282
+ const type: ProtocolRequestType<WillSaveTextDocumentParams, TextEdit[] | null, never, void, TextDocumentRegistrationOptions>;
1283
+ }
1284
+ export interface DidChangeWatchedFilesClientCapabilities {
1285
+ /**
1286
+ * Did change watched files notification supports dynamic registration. Please note
1287
+ * that the current protocol doesn't support static configuration for file changes
1288
+ * from the server side.
1289
+ */
1290
+ dynamicRegistration?: boolean;
1291
+ }
1292
+ /**
1293
+ * The watched files notification is sent from the client to the server when
1294
+ * the client detects changes to file watched by the language client.
1295
+ */
1296
+ export declare namespace DidChangeWatchedFilesNotification {
1297
+ const type: ProtocolNotificationType<DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions>;
1298
+ }
1299
+ /**
1300
+ * The watched files change notification's parameters.
1301
+ */
1302
+ export interface DidChangeWatchedFilesParams {
1303
+ /**
1304
+ * The actual file events.
1305
+ */
1306
+ changes: FileEvent[];
1307
+ }
1308
+ /**
1309
+ * The file event type
1310
+ */
1311
+ export declare namespace FileChangeType {
1312
+ /**
1313
+ * The file got created.
1314
+ */
1315
+ const Created = 1;
1316
+ /**
1317
+ * The file got changed.
1318
+ */
1319
+ const Changed = 2;
1320
+ /**
1321
+ * The file got deleted.
1322
+ */
1323
+ const Deleted = 3;
1324
+ }
1325
+ export declare type FileChangeType = 1 | 2 | 3;
1326
+ /**
1327
+ * An event describing a file change.
1328
+ */
1329
+ export interface FileEvent {
1330
+ /**
1331
+ * The file's uri.
1332
+ */
1333
+ uri: DocumentUri;
1334
+ /**
1335
+ * The change type.
1336
+ */
1337
+ type: FileChangeType;
1338
+ }
1339
+ /**
1340
+ * Describe options to be used when registered for text document change events.
1341
+ */
1342
+ export interface DidChangeWatchedFilesRegistrationOptions {
1343
+ /**
1344
+ * The watchers to register.
1345
+ */
1346
+ watchers: FileSystemWatcher[];
1347
+ }
1348
+ export interface FileSystemWatcher {
1349
+ /**
1350
+ * The glob pattern to watch. Glob patterns can have the following syntax:
1351
+ * - `*` to match one or more characters in a path segment
1352
+ * - `?` to match on one character in a path segment
1353
+ * - `**` to match any number of path segments, including none
1354
+ * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
1355
+ * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
1356
+ * - `[!...]` 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`)
1357
+ */
1358
+ globPattern: string;
1359
+ /**
1360
+ * The kind of events of interest. If omitted it defaults
1361
+ * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
1362
+ * which is 7.
1363
+ */
1364
+ kind?: uinteger;
1365
+ }
1366
+ export declare namespace WatchKind {
1367
+ /**
1368
+ * Interested in create events.
1369
+ */
1370
+ const Create = 1;
1371
+ /**
1372
+ * Interested in change events
1373
+ */
1374
+ const Change = 2;
1375
+ /**
1376
+ * Interested in delete events
1377
+ */
1378
+ const Delete = 4;
1379
+ }
1380
+ /**
1381
+ * The publish diagnostic client capabilities.
1382
+ */
1383
+ export interface PublishDiagnosticsClientCapabilities {
1384
+ /**
1385
+ * Whether the clients accepts diagnostics with related information.
1386
+ */
1387
+ relatedInformation?: boolean;
1388
+ /**
1389
+ * Client supports the tag property to provide meta data about a diagnostic.
1390
+ * Clients supporting tags have to handle unknown tags gracefully.
1391
+ *
1392
+ * @since 3.15.0
1393
+ */
1394
+ tagSupport?: {
1395
+ /**
1396
+ * The tags supported by the client.
1397
+ */
1398
+ valueSet: DiagnosticTag[];
1399
+ };
1400
+ /**
1401
+ * Whether the client interprets the version property of the
1402
+ * `textDocument/publishDiagnostics` notification`s parameter.
1403
+ *
1404
+ * @since 3.15.0
1405
+ */
1406
+ versionSupport?: boolean;
1407
+ /**
1408
+ * Client supports a codeDescription property
1409
+ *
1410
+ * @since 3.16.0
1411
+ */
1412
+ codeDescriptionSupport?: boolean;
1413
+ /**
1414
+ * Whether code action supports the `data` property which is
1415
+ * preserved between a `textDocument/publishDiagnostics` and
1416
+ * `textDocument/codeAction` request.
1417
+ *
1418
+ * @since 3.16.0
1419
+ */
1420
+ dataSupport?: boolean;
1421
+ }
1422
+ /**
1423
+ * The publish diagnostic notification's parameters.
1424
+ */
1425
+ export interface PublishDiagnosticsParams {
1426
+ /**
1427
+ * The URI for which diagnostic information is reported.
1428
+ */
1429
+ uri: DocumentUri;
1430
+ /**
1431
+ * Optional the version number of the document the diagnostics are published for.
1432
+ *
1433
+ * @since 3.15.0
1434
+ */
1435
+ version?: integer;
1436
+ /**
1437
+ * An array of diagnostic information items.
1438
+ */
1439
+ diagnostics: Diagnostic[];
1440
+ }
1441
+ /**
1442
+ * Diagnostics notification are sent from the server to the client to signal
1443
+ * results of validation runs.
1444
+ */
1445
+ export declare namespace PublishDiagnosticsNotification {
1446
+ const type: ProtocolNotificationType<PublishDiagnosticsParams, void>;
1447
+ }
1448
+ /**
1449
+ * Completion client capabilities
1450
+ */
1451
+ export interface CompletionClientCapabilities {
1452
+ /**
1453
+ * Whether completion supports dynamic registration.
1454
+ */
1455
+ dynamicRegistration?: boolean;
1456
+ /**
1457
+ * The client supports the following `CompletionItem` specific
1458
+ * capabilities.
1459
+ */
1460
+ completionItem?: {
1461
+ /**
1462
+ * Client supports snippets as insert text.
1463
+ *
1464
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
1465
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1466
+ * the end of the snippet. Placeholders with equal identifiers are linked,
1467
+ * that is typing in one will update others too.
1468
+ */
1469
+ snippetSupport?: boolean;
1470
+ /**
1471
+ * Client supports commit characters on a completion item.
1472
+ */
1473
+ commitCharactersSupport?: boolean;
1474
+ /**
1475
+ * Client supports the follow content formats for the documentation
1476
+ * property. The order describes the preferred format of the client.
1477
+ */
1478
+ documentationFormat?: MarkupKind[];
1479
+ /**
1480
+ * Client supports the deprecated property on a completion item.
1481
+ */
1482
+ deprecatedSupport?: boolean;
1483
+ /**
1484
+ * Client supports the preselect property on a completion item.
1485
+ */
1486
+ preselectSupport?: boolean;
1487
+ /**
1488
+ * Client supports to kee
1489
+ */
1490
+ /**
1491
+ * Client supports the tag property on a completion item. Clients supporting
1492
+ * tags have to handle unknown tags gracefully. Clients especially need to
1493
+ * preserve unknown tags when sending a completion item back to the server in
1494
+ * a resolve call.
1495
+ *
1496
+ * @since 3.15.0
1497
+ */
1498
+ tagSupport?: {
1499
+ /**
1500
+ * The tags supported by the client.
1501
+ */
1502
+ valueSet: CompletionItemTag[];
1503
+ };
1504
+ /**
1505
+ * Client support insert replace edit to control different behavior if a
1506
+ * completion item is inserted in the text or should replace text.
1507
+ *
1508
+ * @since 3.16.0
1509
+ */
1510
+ insertReplaceSupport?: boolean;
1511
+ /**
1512
+ * Indicates which properties a client can resolve lazily on a completion
1513
+ * item. Before version 3.16.0 only the predefined properties `documentation`
1514
+ * and `details` could be resolved lazily.
1515
+ *
1516
+ * @since 3.16.0
1517
+ */
1518
+ resolveSupport?: {
1519
+ /**
1520
+ * The properties that a client can resolve lazily.
1521
+ */
1522
+ properties: string[];
1523
+ };
1524
+ /**
1525
+ * The client supports the `insertTextMode` property on
1526
+ * a completion item to override the whitespace handling mode
1527
+ * as defined by the client (see `insertTextMode`).
1528
+ *
1529
+ * @since 3.16.0
1530
+ */
1531
+ insertTextModeSupport?: {
1532
+ valueSet: InsertTextMode[];
1533
+ };
1534
+ /**
1535
+ * The client has support for completion item label
1536
+ * details (see also `CompletionItemLabelDetails`).
1537
+ *
1538
+ * @since 3.17.0 - proposed state
1539
+ */
1540
+ labelDetailsSupport?: boolean;
1541
+ };
1542
+ completionItemKind?: {
1543
+ /**
1544
+ * The completion item kind values the client supports. When this
1545
+ * property exists the client also guarantees that it will
1546
+ * handle values outside its set gracefully and falls back
1547
+ * to a default value when unknown.
1548
+ *
1549
+ * If this property is not present the client only supports
1550
+ * the completion items kinds from `Text` to `Reference` as defined in
1551
+ * the initial version of the protocol.
1552
+ */
1553
+ valueSet?: CompletionItemKind[];
1554
+ };
1555
+ /**
1556
+ * Defines how the client handles whitespace and indentation
1557
+ * when accepting a completion item that uses multi line
1558
+ * text in either `insertText` or `textEdit`.
1559
+ *
1560
+ * @since 3.17.0
1561
+ */
1562
+ insertTextMode?: InsertTextMode;
1563
+ /**
1564
+ * The client supports to send additional context information for a
1565
+ * `textDocument/completion` request.
1566
+ */
1567
+ contextSupport?: boolean;
1568
+ }
1569
+ /**
1570
+ * How a completion was triggered
1571
+ */
1572
+ export declare namespace CompletionTriggerKind {
1573
+ /**
1574
+ * Completion was triggered by typing an identifier (24x7 code
1575
+ * complete), manual invocation (e.g Ctrl+Space) or via API.
1576
+ */
1577
+ const Invoked: 1;
1578
+ /**
1579
+ * Completion was triggered by a trigger character specified by
1580
+ * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
1581
+ */
1582
+ const TriggerCharacter: 2;
1583
+ /**
1584
+ * Completion was re-triggered as current completion list is incomplete
1585
+ */
1586
+ const TriggerForIncompleteCompletions: 3;
1587
+ }
1588
+ export declare type CompletionTriggerKind = 1 | 2 | 3;
1589
+ /**
1590
+ * Contains additional information about the context in which a completion request is triggered.
1591
+ */
1592
+ export interface CompletionContext {
1593
+ /**
1594
+ * How the completion was triggered.
1595
+ */
1596
+ triggerKind: CompletionTriggerKind;
1597
+ /**
1598
+ * The trigger character (a single character) that has trigger code complete.
1599
+ * Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
1600
+ */
1601
+ triggerCharacter?: string;
1602
+ }
1603
+ /**
1604
+ * Completion parameters
1605
+ */
1606
+ export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1607
+ /**
1608
+ * The completion context. This is only available it the client specifies
1609
+ * to send this using the client capability `textDocument.completion.contextSupport === true`
1610
+ */
1611
+ context?: CompletionContext;
1612
+ }
1613
+ /**
1614
+ * Completion options.
1615
+ */
1616
+ export interface CompletionOptions extends WorkDoneProgressOptions {
1617
+ /**
1618
+ * Most tools trigger completion request automatically without explicitly requesting
1619
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
1620
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
1621
+ * code complete will automatically pop up present `console` besides others as a
1622
+ * completion item. Characters that make up identifiers don't need to be listed here.
1623
+ *
1624
+ * If code complete should automatically be trigger on characters not being valid inside
1625
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
1626
+ */
1627
+ triggerCharacters?: string[];
1628
+ /**
1629
+ * The list of all possible characters that commit a completion. This field can be used
1630
+ * if clients don't support individual commit characters per completion item. See
1631
+ * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
1632
+ *
1633
+ * If a server provides both `allCommitCharacters` and commit characters on an individual
1634
+ * completion item the ones on the completion item win.
1635
+ *
1636
+ * @since 3.2.0
1637
+ */
1638
+ allCommitCharacters?: string[];
1639
+ /**
1640
+ * The server provides support to resolve additional
1641
+ * information for a completion item.
1642
+ */
1643
+ resolveProvider?: boolean;
1644
+ /**
1645
+ * The server supports the following `CompletionItem` specific
1646
+ * capabilities.
1647
+ *
1648
+ * @since 3.17.0 - proposed state
1649
+ */
1650
+ completionItem?: {
1651
+ /**
1652
+ * The server has support for completion item label
1653
+ * details (see also `CompletionItemLabelDetails`) when
1654
+ * receiving a completion item in a resolve call.
1655
+ *
1656
+ * @since 3.17.0 - proposed state
1657
+ */
1658
+ labelDetailsSupport?: boolean;
1659
+ };
1660
+ }
1661
+ /**
1662
+ * Registration options for a [CompletionRequest](#CompletionRequest).
1663
+ */
1664
+ export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions {
1665
+ }
1666
+ /**
1667
+ * Request to request completion at a given text document position. The request's
1668
+ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
1669
+ * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
1670
+ * or a Thenable that resolves to such.
1671
+ *
1672
+ * The request can delay the computation of the [`detail`](#CompletionItem.detail)
1673
+ * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
1674
+ * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
1675
+ * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
1676
+ */
1677
+ export declare namespace CompletionRequest {
1678
+ const method: 'textDocument/completion';
1679
+ const type: ProtocolRequestType<CompletionParams, CompletionList | CompletionItem[] | null, CompletionItem[], void, CompletionRegistrationOptions>;
1680
+ }
1681
+ /**
1682
+ * Request to resolve additional information for a given completion item.The request's
1683
+ * parameter is of type [CompletionItem](#CompletionItem) the response
1684
+ * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
1685
+ */
1686
+ export declare namespace CompletionResolveRequest {
1687
+ const method: 'completionItem/resolve';
1688
+ const type: ProtocolRequestType<CompletionItem, CompletionItem, never, void, void>;
1689
+ }
1690
+ export interface HoverClientCapabilities {
1691
+ /**
1692
+ * Whether hover supports dynamic registration.
1693
+ */
1694
+ dynamicRegistration?: boolean;
1695
+ /**
1696
+ * Client supports the follow content formats for the content
1697
+ * property. The order describes the preferred format of the client.
1698
+ */
1699
+ contentFormat?: MarkupKind[];
1700
+ }
1701
+ /**
1702
+ * Hover options.
1703
+ */
1704
+ export interface HoverOptions extends WorkDoneProgressOptions {
1705
+ }
1706
+ /**
1707
+ * Parameters for a [HoverRequest](#HoverRequest).
1708
+ */
1709
+ export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1710
+ }
1711
+ /**
1712
+ * Registration options for a [HoverRequest](#HoverRequest).
1713
+ */
1714
+ export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions {
1715
+ }
1716
+ /**
1717
+ * Request to request hover information at a given text document position. The request's
1718
+ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
1719
+ * type [Hover](#Hover) or a Thenable that resolves to such.
1720
+ */
1721
+ export declare namespace HoverRequest {
1722
+ const method: 'textDocument/hover';
1723
+ const type: ProtocolRequestType<HoverParams, Hover | null, never, void, HoverRegistrationOptions>;
1724
+ }
1725
+ /**
1726
+ * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1727
+ */
1728
+ export interface SignatureHelpClientCapabilities {
1729
+ /**
1730
+ * Whether signature help supports dynamic registration.
1731
+ */
1732
+ dynamicRegistration?: boolean;
1733
+ /**
1734
+ * The client supports the following `SignatureInformation`
1735
+ * specific properties.
1736
+ */
1737
+ signatureInformation?: {
1738
+ /**
1739
+ * Client supports the follow content formats for the documentation
1740
+ * property. The order describes the preferred format of the client.
1741
+ */
1742
+ documentationFormat?: MarkupKind[];
1743
+ /**
1744
+ * Client capabilities specific to parameter information.
1745
+ */
1746
+ parameterInformation?: {
1747
+ /**
1748
+ * The client supports processing label offsets instead of a
1749
+ * simple label string.
1750
+ *
1751
+ * @since 3.14.0
1752
+ */
1753
+ labelOffsetSupport?: boolean;
1754
+ };
1755
+ /**
1756
+ * The client support the `activeParameter` property on `SignatureInformation`
1757
+ * literal.
1758
+ *
1759
+ * @since 3.16.0
1760
+ */
1761
+ activeParameterSupport?: boolean;
1762
+ };
1763
+ /**
1764
+ * The client supports to send additional context information for a
1765
+ * `textDocument/signatureHelp` request. A client that opts into
1766
+ * contextSupport will also support the `retriggerCharacters` on
1767
+ * `SignatureHelpOptions`.
1768
+ *
1769
+ * @since 3.15.0
1770
+ */
1771
+ contextSupport?: boolean;
1772
+ }
1773
+ /**
1774
+ * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1775
+ */
1776
+ export interface SignatureHelpOptions extends WorkDoneProgressOptions {
1777
+ /**
1778
+ * List of characters that trigger signature help.
1779
+ */
1780
+ triggerCharacters?: string[];
1781
+ /**
1782
+ * List of characters that re-trigger signature help.
1783
+ *
1784
+ * These trigger characters are only active when signature help is already showing. All trigger characters
1785
+ * are also counted as re-trigger characters.
1786
+ *
1787
+ * @since 3.15.0
1788
+ */
1789
+ retriggerCharacters?: string[];
1790
+ }
1791
+ /**
1792
+ * How a signature help was triggered.
1793
+ *
1794
+ * @since 3.15.0
1795
+ */
1796
+ export declare namespace SignatureHelpTriggerKind {
1797
+ /**
1798
+ * Signature help was invoked manually by the user or by a command.
1799
+ */
1800
+ const Invoked: 1;
1801
+ /**
1802
+ * Signature help was triggered by a trigger character.
1803
+ */
1804
+ const TriggerCharacter: 2;
1805
+ /**
1806
+ * Signature help was triggered by the cursor moving or by the document content changing.
1807
+ */
1808
+ const ContentChange: 3;
1809
+ }
1810
+ export declare type SignatureHelpTriggerKind = 1 | 2 | 3;
1811
+ /**
1812
+ * Additional information about the context in which a signature help request was triggered.
1813
+ *
1814
+ * @since 3.15.0
1815
+ */
1816
+ export interface SignatureHelpContext {
1817
+ /**
1818
+ * Action that caused signature help to be triggered.
1819
+ */
1820
+ triggerKind: SignatureHelpTriggerKind;
1821
+ /**
1822
+ * Character that caused signature help to be triggered.
1823
+ *
1824
+ * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
1825
+ */
1826
+ triggerCharacter?: string;
1827
+ /**
1828
+ * `true` if signature help was already showing when it was triggered.
1829
+ *
1830
+ * Retrigger occurs when the signature help is already active and can be caused by actions such as
1831
+ * typing a trigger character, a cursor move, or document content changes.
1832
+ */
1833
+ isRetrigger: boolean;
1834
+ /**
1835
+ * The currently active `SignatureHelp`.
1836
+ *
1837
+ * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
1838
+ * the user navigating through available signatures.
1839
+ */
1840
+ activeSignatureHelp?: SignatureHelp;
1841
+ }
1842
+ /**
1843
+ * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
1844
+ */
1845
+ export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1846
+ /**
1847
+ * The signature help context. This is only available if the client specifies
1848
+ * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
1849
+ *
1850
+ * @since 3.15.0
1851
+ */
1852
+ context?: SignatureHelpContext;
1853
+ }
1854
+ /**
1855
+ * Registration options for a [SignatureHelpRequest](#SignatureHelpRequest).
1856
+ */
1857
+ export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions {
1858
+ }
1859
+ export declare namespace SignatureHelpRequest {
1860
+ const method: 'textDocument/signatureHelp';
1861
+ const type: ProtocolRequestType<SignatureHelpParams, SignatureHelp | null, never, void, SignatureHelpRegistrationOptions>;
1862
+ }
1863
+ /**
1864
+ * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
1865
+ */
1866
+ export interface DefinitionClientCapabilities {
1867
+ /**
1868
+ * Whether definition supports dynamic registration.
1869
+ */
1870
+ dynamicRegistration?: boolean;
1871
+ /**
1872
+ * The client supports additional metadata in the form of definition links.
1873
+ *
1874
+ * @since 3.14.0
1875
+ */
1876
+ linkSupport?: boolean;
1877
+ }
1878
+ /**
1879
+ * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
1880
+ */
1881
+ export interface DefinitionOptions extends WorkDoneProgressOptions {
1882
+ }
1883
+ /**
1884
+ * Parameters for a [DefinitionRequest](#DefinitionRequest).
1885
+ */
1886
+ export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1887
+ }
1888
+ /**
1889
+ * Registration options for a [DefinitionRequest](#DefinitionRequest).
1890
+ */
1891
+ export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions {
1892
+ }
1893
+ /**
1894
+ * A request to resolve the definition location of a symbol at a given text
1895
+ * document position. The request's parameter is of type [TextDocumentPosition]
1896
+ * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
1897
+ * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
1898
+ * to such.
1899
+ */
1900
+ export declare namespace DefinitionRequest {
1901
+ const method: 'textDocument/definition';
1902
+ const type: ProtocolRequestType<DefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, DefinitionRegistrationOptions>;
1903
+ }
1904
+ /**
1905
+ * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
1906
+ */
1907
+ export interface ReferenceClientCapabilities {
1908
+ /**
1909
+ * Whether references supports dynamic registration.
1910
+ */
1911
+ dynamicRegistration?: boolean;
1912
+ }
1913
+ /**
1914
+ * Parameters for a [ReferencesRequest](#ReferencesRequest).
1915
+ */
1916
+ export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1917
+ context: ReferenceContext;
1918
+ }
1919
+ /**
1920
+ * Reference options.
1921
+ */
1922
+ export interface ReferenceOptions extends WorkDoneProgressOptions {
1923
+ }
1924
+ /**
1925
+ * Registration options for a [ReferencesRequest](#ReferencesRequest).
1926
+ */
1927
+ export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions {
1928
+ }
1929
+ /**
1930
+ * A request to resolve project-wide references for the symbol denoted
1931
+ * by the given text document position. The request's parameter is of
1932
+ * type [ReferenceParams](#ReferenceParams) the response is of type
1933
+ * [Location[]](#Location) or a Thenable that resolves to such.
1934
+ */
1935
+ export declare namespace ReferencesRequest {
1936
+ const method: 'textDocument/references';
1937
+ const type: ProtocolRequestType<ReferenceParams, Location[] | null, Location[], void, ReferenceRegistrationOptions>;
1938
+ }
1939
+ /**
1940
+ * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1941
+ */
1942
+ export interface DocumentHighlightClientCapabilities {
1943
+ /**
1944
+ * Whether document highlight supports dynamic registration.
1945
+ */
1946
+ dynamicRegistration?: boolean;
1947
+ }
1948
+ /**
1949
+ * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1950
+ */
1951
+ export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1952
+ }
1953
+ /**
1954
+ * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1955
+ */
1956
+ export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
1957
+ }
1958
+ /**
1959
+ * Registration options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1960
+ */
1961
+ export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions {
1962
+ }
1963
+ /**
1964
+ * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
1965
+ * text document position. The request's parameter is of type [TextDocumentPosition]
1966
+ * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
1967
+ * (#DocumentHighlight) or a Thenable that resolves to such.
1968
+ */
1969
+ export declare namespace DocumentHighlightRequest {
1970
+ const method: 'textDocument/documentHighlight';
1971
+ const type: ProtocolRequestType<DocumentHighlightParams, DocumentHighlight[] | null, DocumentHighlight[], void, DocumentHighlightRegistrationOptions>;
1972
+ }
1973
+ /**
1974
+ * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1975
+ */
1976
+ export interface DocumentSymbolClientCapabilities {
1977
+ /**
1978
+ * Whether document symbol supports dynamic registration.
1979
+ */
1980
+ dynamicRegistration?: boolean;
1981
+ /**
1982
+ * Specific capabilities for the `SymbolKind`.
1983
+ */
1984
+ symbolKind?: {
1985
+ /**
1986
+ * The symbol kind values the client supports. When this
1987
+ * property exists the client also guarantees that it will
1988
+ * handle values outside its set gracefully and falls back
1989
+ * to a default value when unknown.
1990
+ *
1991
+ * If this property is not present the client only supports
1992
+ * the symbol kinds from `File` to `Array` as defined in
1993
+ * the initial version of the protocol.
1994
+ */
1995
+ valueSet?: SymbolKind[];
1996
+ };
1997
+ /**
1998
+ * The client support hierarchical document symbols.
1999
+ */
2000
+ hierarchicalDocumentSymbolSupport?: boolean;
2001
+ /**
2002
+ * The client supports tags on `SymbolInformation`. Tags are supported on
2003
+ * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
2004
+ * Clients supporting tags have to handle unknown tags gracefully.
2005
+ *
2006
+ * @since 3.16.0
2007
+ */
2008
+ tagSupport?: {
2009
+ /**
2010
+ * The tags supported by the client.
2011
+ */
2012
+ valueSet: SymbolTag[];
2013
+ };
2014
+ /**
2015
+ * The client supports an additional label presented in the UI when
2016
+ * registering a document symbol provider.
2017
+ *
2018
+ * @since 3.16.0
2019
+ */
2020
+ labelSupport?: boolean;
2021
+ }
2022
+ /**
2023
+ * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
2024
+ */
2025
+ export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams {
2026
+ /**
2027
+ * The text document.
2028
+ */
2029
+ textDocument: TextDocumentIdentifier;
2030
+ }
2031
+ /**
2032
+ * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
2033
+ */
2034
+ export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
2035
+ /**
2036
+ * A human-readable string that is shown when multiple outlines trees
2037
+ * are shown for the same document.
2038
+ *
2039
+ * @since 3.16.0
2040
+ */
2041
+ label?: string;
2042
+ }
2043
+ /**
2044
+ * Registration options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
2045
+ */
2046
+ export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions {
2047
+ }
2048
+ /**
2049
+ * A request to list all symbols found in a given text document. The request's
2050
+ * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
2051
+ * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
2052
+ * that resolves to such.
2053
+ */
2054
+ export declare namespace DocumentSymbolRequest {
2055
+ const method: 'textDocument/documentSymbol';
2056
+ const type: ProtocolRequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, DocumentSymbol[] | SymbolInformation[], void, DocumentSymbolRegistrationOptions>;
2057
+ }
2058
+ /**
2059
+ * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
2060
+ */
2061
+ export interface CodeActionClientCapabilities {
2062
+ /**
2063
+ * Whether code action supports dynamic registration.
2064
+ */
2065
+ dynamicRegistration?: boolean;
2066
+ /**
2067
+ * The client support code action literals of type `CodeAction` as a valid
2068
+ * response of the `textDocument/codeAction` request. If the property is not
2069
+ * set the request can only return `Command` literals.
2070
+ *
2071
+ * @since 3.8.0
2072
+ */
2073
+ codeActionLiteralSupport?: {
2074
+ /**
2075
+ * The code action kind is support with the following value
2076
+ * set.
2077
+ */
2078
+ codeActionKind: {
2079
+ /**
2080
+ * The code action kind values the client supports. When this
2081
+ * property exists the client also guarantees that it will
2082
+ * handle values outside its set gracefully and falls back
2083
+ * to a default value when unknown.
2084
+ */
2085
+ valueSet: CodeActionKind[];
2086
+ };
2087
+ };
2088
+ /**
2089
+ * Whether code action supports the `isPreferred` property.
2090
+ *
2091
+ * @since 3.15.0
2092
+ */
2093
+ isPreferredSupport?: boolean;
2094
+ /**
2095
+ * Whether code action supports the `disabled` property.
2096
+ *
2097
+ * @since 3.16.0
2098
+ */
2099
+ disabledSupport?: boolean;
2100
+ /**
2101
+ * Whether code action supports the `data` property which is
2102
+ * preserved between a `textDocument/codeAction` and a
2103
+ * `codeAction/resolve` request.
2104
+ *
2105
+ * @since 3.16.0
2106
+ */
2107
+ dataSupport?: boolean;
2108
+ /**
2109
+ * Whether the client support resolving additional code action
2110
+ * properties via a separate `codeAction/resolve` request.
2111
+ *
2112
+ * @since 3.16.0
2113
+ */
2114
+ resolveSupport?: {
2115
+ /**
2116
+ * The properties that a client can resolve lazily.
2117
+ */
2118
+ properties: string[];
2119
+ };
2120
+ /**
2121
+ * Whether th client honors the change annotations in
2122
+ * text edits and resource operations returned via the
2123
+ * `CodeAction#edit` property by for example presenting
2124
+ * the workspace edit in the user interface and asking
2125
+ * for confirmation.
2126
+ *
2127
+ * @since 3.16.0
2128
+ */
2129
+ honorsChangeAnnotations?: boolean;
2130
+ }
2131
+ /**
2132
+ * The parameters of a [CodeActionRequest](#CodeActionRequest).
2133
+ */
2134
+ export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams {
2135
+ /**
2136
+ * The document in which the command was invoked.
2137
+ */
2138
+ textDocument: TextDocumentIdentifier;
2139
+ /**
2140
+ * The range for which the command was invoked.
2141
+ */
2142
+ range: Range;
2143
+ /**
2144
+ * Context carrying additional information.
2145
+ */
2146
+ context: CodeActionContext;
2147
+ }
2148
+ /**
2149
+ * Provider options for a [CodeActionRequest](#CodeActionRequest).
2150
+ */
2151
+ export interface CodeActionOptions extends WorkDoneProgressOptions {
2152
+ /**
2153
+ * CodeActionKinds that this server may return.
2154
+ *
2155
+ * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
2156
+ * may list out every specific kind they provide.
2157
+ */
2158
+ codeActionKinds?: CodeActionKind[];
2159
+ /**
2160
+ * The server provides support to resolve additional
2161
+ * information for a code action.
2162
+ *
2163
+ * @since 3.16.0
2164
+ */
2165
+ resolveProvider?: boolean;
2166
+ }
2167
+ /**
2168
+ * Registration options for a [CodeActionRequest](#CodeActionRequest).
2169
+ */
2170
+ export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions {
2171
+ }
2172
+ /**
2173
+ * A request to provide commands for the given text document and range.
2174
+ */
2175
+ export declare namespace CodeActionRequest {
2176
+ const method: 'textDocument/codeAction';
2177
+ const type: ProtocolRequestType<CodeActionParams, (Command | CodeAction)[] | null, (Command | CodeAction)[], void, CodeActionRegistrationOptions>;
2178
+ }
2179
+ /**
2180
+ * Request to resolve additional information for a given code action.The request's
2181
+ * parameter is of type [CodeAction](#CodeAction) the response
2182
+ * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such.
2183
+ */
2184
+ export declare namespace CodeActionResolveRequest {
2185
+ const method: 'codeAction/resolve';
2186
+ const type: ProtocolRequestType<CodeAction, CodeAction, never, void, void>;
2187
+ }
2188
+ /**
2189
+ * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
2190
+ */
2191
+ export interface WorkspaceSymbolClientCapabilities {
2192
+ /**
2193
+ * Symbol request supports dynamic registration.
2194
+ */
2195
+ dynamicRegistration?: boolean;
2196
+ /**
2197
+ * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
2198
+ */
2199
+ symbolKind?: {
2200
+ /**
2201
+ * The symbol kind values the client supports. When this
2202
+ * property exists the client also guarantees that it will
2203
+ * handle values outside its set gracefully and falls back
2204
+ * to a default value when unknown.
2205
+ *
2206
+ * If this property is not present the client only supports
2207
+ * the symbol kinds from `File` to `Array` as defined in
2208
+ * the initial version of the protocol.
2209
+ */
2210
+ valueSet?: SymbolKind[];
2211
+ };
2212
+ /**
2213
+ * The client supports tags on `SymbolInformation`.
2214
+ * Clients supporting tags have to handle unknown tags gracefully.
2215
+ *
2216
+ * @since 3.16.0
2217
+ */
2218
+ tagSupport?: {
2219
+ /**
2220
+ * The tags supported by the client.
2221
+ */
2222
+ valueSet: SymbolTag[];
2223
+ };
2224
+ }
2225
+ /**
2226
+ * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
2227
+ */
2228
+ export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
2229
+ /**
2230
+ * A query string to filter symbols by. Clients may send an empty
2231
+ * string here to request all symbols.
2232
+ */
2233
+ query: string;
2234
+ }
2235
+ /**
2236
+ * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
2237
+ */
2238
+ export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
2239
+ }
2240
+ /**
2241
+ * Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
2242
+ */
2243
+ export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
2244
+ }
2245
+ /**
2246
+ * A request to list project-wide symbols matching the query string given
2247
+ * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
2248
+ * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
2249
+ * resolves to such.
2250
+ */
2251
+ export declare namespace WorkspaceSymbolRequest {
2252
+ const method: 'workspace/symbol';
2253
+ const type: ProtocolRequestType<WorkspaceSymbolParams, SymbolInformation[] | null, SymbolInformation[], void, WorkspaceSymbolRegistrationOptions>;
2254
+ }
2255
+ /**
2256
+ * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
2257
+ */
2258
+ export interface CodeLensClientCapabilities {
2259
+ /**
2260
+ * Whether code lens supports dynamic registration.
2261
+ */
2262
+ dynamicRegistration?: boolean;
2263
+ }
2264
+ /**
2265
+ * @since 3.16.0
2266
+ */
2267
+ export interface CodeLensWorkspaceClientCapabilities {
2268
+ /**
2269
+ * Whether the client implementation supports a refresh request sent from the
2270
+ * server to the client.
2271
+ *
2272
+ * Note that this event is global and will force the client to refresh all
2273
+ * code lenses currently shown. It should be used with absolute care and is
2274
+ * useful for situation where a server for example detect a project wide
2275
+ * change that requires such a calculation.
2276
+ */
2277
+ refreshSupport?: boolean;
2278
+ }
2279
+ /**
2280
+ * The parameters of a [CodeLensRequest](#CodeLensRequest).
2281
+ */
2282
+ export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams {
2283
+ /**
2284
+ * The document to request code lens for.
2285
+ */
2286
+ textDocument: TextDocumentIdentifier;
2287
+ }
2288
+ /**
2289
+ * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
2290
+ */
2291
+ export interface CodeLensOptions extends WorkDoneProgressOptions {
2292
+ /**
2293
+ * Code lens has a resolve provider as well.
2294
+ */
2295
+ resolveProvider?: boolean;
2296
+ }
2297
+ /**
2298
+ * Registration options for a [CodeLensRequest](#CodeLensRequest).
2299
+ */
2300
+ export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions {
2301
+ }
2302
+ /**
2303
+ * A request to provide code lens for the given text document.
2304
+ */
2305
+ export declare namespace CodeLensRequest {
2306
+ const method: 'textDocument/codeLens';
2307
+ const type: ProtocolRequestType<CodeLensParams, CodeLens[] | null, CodeLens[], void, CodeLensRegistrationOptions>;
2308
+ }
2309
+ /**
2310
+ * A request to resolve a command for a given code lens.
2311
+ */
2312
+ export declare namespace CodeLensResolveRequest {
2313
+ const method: 'codeLens/resolve';
2314
+ const type: ProtocolRequestType<CodeLens, CodeLens, never, void, void>;
2315
+ }
2316
+ /**
2317
+ * A request to refresh all code actions
2318
+ *
2319
+ * @since 3.16.0
2320
+ */
2321
+ export declare namespace CodeLensRefreshRequest {
2322
+ const method: `workspace/codeLens/refresh`;
2323
+ const type: ProtocolRequestType0<void, void, void, void>;
2324
+ }
2325
+ /**
2326
+ * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
2327
+ */
2328
+ export interface DocumentLinkClientCapabilities {
2329
+ /**
2330
+ * Whether document link supports dynamic registration.
2331
+ */
2332
+ dynamicRegistration?: boolean;
2333
+ /**
2334
+ * Whether the client support the `tooltip` property on `DocumentLink`.
2335
+ *
2336
+ * @since 3.15.0
2337
+ */
2338
+ tooltipSupport?: boolean;
2339
+ }
2340
+ /**
2341
+ * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
2342
+ */
2343
+ export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
2344
+ /**
2345
+ * The document to provide document links for.
2346
+ */
2347
+ textDocument: TextDocumentIdentifier;
2348
+ }
2349
+ /**
2350
+ * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
2351
+ */
2352
+ export interface DocumentLinkOptions extends WorkDoneProgressOptions {
2353
+ /**
2354
+ * Document links have a resolve provider as well.
2355
+ */
2356
+ resolveProvider?: boolean;
2357
+ }
2358
+ /**
2359
+ * Registration options for a [DocumentLinkRequest](#DocumentLinkRequest).
2360
+ */
2361
+ export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
2362
+ }
2363
+ /**
2364
+ * A request to provide document links
2365
+ */
2366
+ export declare namespace DocumentLinkRequest {
2367
+ const method: 'textDocument/documentLink';
2368
+ const type: ProtocolRequestType<DocumentLinkParams, DocumentLink[] | null, DocumentLink[], void, DocumentLinkRegistrationOptions>;
2369
+ }
2370
+ /**
2371
+ * Request to resolve additional information for a given document link. The request's
2372
+ * parameter is of type [DocumentLink](#DocumentLink) the response
2373
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
2374
+ */
2375
+ export declare namespace DocumentLinkResolveRequest {
2376
+ const method: 'documentLink/resolve';
2377
+ const type: ProtocolRequestType<DocumentLink, DocumentLink, never, void, void>;
2378
+ }
2379
+ /**
2380
+ * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
2381
+ */
2382
+ export interface DocumentFormattingClientCapabilities {
2383
+ /**
2384
+ * Whether formatting supports dynamic registration.
2385
+ */
2386
+ dynamicRegistration?: boolean;
2387
+ }
2388
+ /**
2389
+ * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
2390
+ */
2391
+ export interface DocumentFormattingParams extends WorkDoneProgressParams {
2392
+ /**
2393
+ * The document to format.
2394
+ */
2395
+ textDocument: TextDocumentIdentifier;
2396
+ /**
2397
+ * The format options
2398
+ */
2399
+ options: FormattingOptions;
2400
+ }
2401
+ /**
2402
+ * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
2403
+ */
2404
+ export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
2405
+ }
2406
+ /**
2407
+ * Registration options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
2408
+ */
2409
+ export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions {
2410
+ }
2411
+ /**
2412
+ * A request to to format a whole document.
2413
+ */
2414
+ export declare namespace DocumentFormattingRequest {
2415
+ const method: 'textDocument/formatting';
2416
+ const type: ProtocolRequestType<DocumentFormattingParams, TextEdit[] | null, never, void, DocumentFormattingRegistrationOptions>;
2417
+ }
2418
+ /**
2419
+ * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
2420
+ */
2421
+ export interface DocumentRangeFormattingClientCapabilities {
2422
+ /**
2423
+ * Whether range formatting supports dynamic registration.
2424
+ */
2425
+ dynamicRegistration?: boolean;
2426
+ }
2427
+ /**
2428
+ * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
2429
+ */
2430
+ export interface DocumentRangeFormattingParams extends WorkDoneProgressParams {
2431
+ /**
2432
+ * The document to format.
2433
+ */
2434
+ textDocument: TextDocumentIdentifier;
2435
+ /**
2436
+ * The range to format
2437
+ */
2438
+ range: Range;
2439
+ /**
2440
+ * The format options
2441
+ */
2442
+ options: FormattingOptions;
2443
+ }
2444
+ /**
2445
+ * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
2446
+ */
2447
+ export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
2448
+ }
2449
+ /**
2450
+ * Registration options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
2451
+ */
2452
+ export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions {
2453
+ }
2454
+ /**
2455
+ * A request to to format a range in a document.
2456
+ */
2457
+ export declare namespace DocumentRangeFormattingRequest {
2458
+ const method: 'textDocument/rangeFormatting';
2459
+ const type: ProtocolRequestType<DocumentRangeFormattingParams, TextEdit[] | null, never, void, DocumentRangeFormattingRegistrationOptions>;
2460
+ }
2461
+ /**
2462
+ * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2463
+ */
2464
+ export interface DocumentOnTypeFormattingClientCapabilities {
2465
+ /**
2466
+ * Whether on type formatting supports dynamic registration.
2467
+ */
2468
+ dynamicRegistration?: boolean;
2469
+ }
2470
+ /**
2471
+ * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2472
+ */
2473
+ export interface DocumentOnTypeFormattingParams {
2474
+ /**
2475
+ * The document to format.
2476
+ */
2477
+ textDocument: TextDocumentIdentifier;
2478
+ /**
2479
+ * The position at which this request was send.
2480
+ */
2481
+ position: Position;
2482
+ /**
2483
+ * The character that has been typed.
2484
+ */
2485
+ ch: string;
2486
+ /**
2487
+ * The format options.
2488
+ */
2489
+ options: FormattingOptions;
2490
+ }
2491
+ /**
2492
+ * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2493
+ */
2494
+ export interface DocumentOnTypeFormattingOptions {
2495
+ /**
2496
+ * A character on which formatting should be triggered, like `}`.
2497
+ */
2498
+ firstTriggerCharacter: string;
2499
+ /**
2500
+ * More trigger characters.
2501
+ */
2502
+ moreTriggerCharacter?: string[];
2503
+ }
2504
+ /**
2505
+ * Registration options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2506
+ */
2507
+ export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions {
2508
+ }
2509
+ /**
2510
+ * A request to format a document on type.
2511
+ */
2512
+ export declare namespace DocumentOnTypeFormattingRequest {
2513
+ const method: 'textDocument/onTypeFormatting';
2514
+ const type: ProtocolRequestType<DocumentOnTypeFormattingParams, TextEdit[] | null, never, void, DocumentOnTypeFormattingRegistrationOptions>;
2515
+ }
2516
+ export declare namespace PrepareSupportDefaultBehavior {
2517
+ /**
2518
+ * The client's default behavior is to select the identifier
2519
+ * according the to language's syntax rule.
2520
+ */
2521
+ const Identifier: 1;
2522
+ }
2523
+ export declare type PrepareSupportDefaultBehavior = 1;
2524
+ export interface RenameClientCapabilities {
2525
+ /**
2526
+ * Whether rename supports dynamic registration.
2527
+ */
2528
+ dynamicRegistration?: boolean;
2529
+ /**
2530
+ * Client supports testing for validity of rename operations
2531
+ * before execution.
2532
+ *
2533
+ * @since 3.12.0
2534
+ */
2535
+ prepareSupport?: boolean;
2536
+ /**
2537
+ * Client supports the default behavior result.
2538
+ *
2539
+ * The value indicates the default behavior used by the
2540
+ * client.
2541
+ *
2542
+ * @since 3.16.0
2543
+ */
2544
+ prepareSupportDefaultBehavior?: PrepareSupportDefaultBehavior;
2545
+ /**
2546
+ * Whether th client honors the change annotations in
2547
+ * text edits and resource operations returned via the
2548
+ * rename request's workspace edit by for example presenting
2549
+ * the workspace edit in the user interface and asking
2550
+ * for confirmation.
2551
+ *
2552
+ * @since 3.16.0
2553
+ */
2554
+ honorsChangeAnnotations?: boolean;
2555
+ }
2556
+ /**
2557
+ * The parameters of a [RenameRequest](#RenameRequest).
2558
+ */
2559
+ export interface RenameParams extends WorkDoneProgressParams {
2560
+ /**
2561
+ * The document to rename.
2562
+ */
2563
+ textDocument: TextDocumentIdentifier;
2564
+ /**
2565
+ * The position at which this request was sent.
2566
+ */
2567
+ position: Position;
2568
+ /**
2569
+ * The new name of the symbol. If the given name is not valid the
2570
+ * request must return a [ResponseError](#ResponseError) with an
2571
+ * appropriate message set.
2572
+ */
2573
+ newName: string;
2574
+ }
2575
+ /**
2576
+ * Provider options for a [RenameRequest](#RenameRequest).
2577
+ */
2578
+ export interface RenameOptions extends WorkDoneProgressOptions {
2579
+ /**
2580
+ * Renames should be checked and tested before being executed.
2581
+ *
2582
+ * @since version 3.12.0
2583
+ */
2584
+ prepareProvider?: boolean;
2585
+ }
2586
+ /**
2587
+ * Registration options for a [RenameRequest](#RenameRequest).
2588
+ */
2589
+ export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions {
2590
+ }
2591
+ /**
2592
+ * A request to rename a symbol.
2593
+ */
2594
+ export declare namespace RenameRequest {
2595
+ const method: 'textDocument/rename';
2596
+ const type: ProtocolRequestType<RenameParams, WorkspaceEdit | null, never, void, RenameRegistrationOptions>;
2597
+ }
2598
+ export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
2599
+ }
2600
+ /**
2601
+ * A request to test and perform the setup necessary for a rename.
2602
+ *
2603
+ * @since 3.16 - support for default behavior
2604
+ */
2605
+ export declare namespace PrepareRenameRequest {
2606
+ const method: 'textDocument/prepareRename';
2607
+ const type: ProtocolRequestType<PrepareRenameParams, Range | {
2608
+ range: Range;
2609
+ placeholder: string;
2610
+ } | {
2611
+ defaultBehavior: boolean;
2612
+ } | null, never, void, void>;
2613
+ }
2614
+ /**
2615
+ * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
2616
+ */
2617
+ export interface ExecuteCommandClientCapabilities {
2618
+ /**
2619
+ * Execute command supports dynamic registration.
2620
+ */
2621
+ dynamicRegistration?: boolean;
2622
+ }
2623
+ /**
2624
+ * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
2625
+ */
2626
+ export interface ExecuteCommandParams extends WorkDoneProgressParams {
2627
+ /**
2628
+ * The identifier of the actual command handler.
2629
+ */
2630
+ command: string;
2631
+ /**
2632
+ * Arguments that the command should be invoked with.
2633
+ */
2634
+ arguments?: any[];
2635
+ }
2636
+ /**
2637
+ * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
2638
+ */
2639
+ export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
2640
+ /**
2641
+ * The commands to be executed on the server
2642
+ */
2643
+ commands: string[];
2644
+ }
2645
+ /**
2646
+ * Registration options for a [ExecuteCommandRequest](#ExecuteCommandRequest).
2647
+ */
2648
+ export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions {
2649
+ }
2650
+ /**
2651
+ * A request send from the client to the server to execute a command. The request might return
2652
+ * a workspace edit which the client will apply to the workspace.
2653
+ */
2654
+ export declare namespace ExecuteCommandRequest {
2655
+ const type: ProtocolRequestType<ExecuteCommandParams, any, never, void, ExecuteCommandRegistrationOptions>;
2656
+ }
2657
+ export interface WorkspaceEditClientCapabilities {
2658
+ /**
2659
+ * The client supports versioned document changes in `WorkspaceEdit`s
2660
+ */
2661
+ documentChanges?: boolean;
2662
+ /**
2663
+ * The resource operations the client supports. Clients should at least
2664
+ * support 'create', 'rename' and 'delete' files and folders.
2665
+ *
2666
+ * @since 3.13.0
2667
+ */
2668
+ resourceOperations?: ResourceOperationKind[];
2669
+ /**
2670
+ * The failure handling strategy of a client if applying the workspace edit
2671
+ * fails.
2672
+ *
2673
+ * @since 3.13.0
2674
+ */
2675
+ failureHandling?: FailureHandlingKind;
2676
+ /**
2677
+ * Whether the client normalizes line endings to the client specific
2678
+ * setting.
2679
+ * If set to `true` the client will normalize line ending characters
2680
+ * in a workspace edit containing to the client specific new line
2681
+ * character.
2682
+ *
2683
+ * @since 3.16.0
2684
+ */
2685
+ normalizesLineEndings?: boolean;
2686
+ /**
2687
+ * Whether the client in general supports change annotations on text edits,
2688
+ * create file, rename file and delete file changes.
2689
+ *
2690
+ * @since 3.16.0
2691
+ */
2692
+ changeAnnotationSupport?: {
2693
+ /**
2694
+ * Whether the client groups edits with equal labels into tree nodes,
2695
+ * for instance all edits labelled with "Changes in Strings" would
2696
+ * be a tree node.
2697
+ */
2698
+ groupsOnLabel?: boolean;
2699
+ };
2700
+ }
2701
+ /**
2702
+ * The parameters passed via a apply workspace edit request.
2703
+ */
2704
+ export interface ApplyWorkspaceEditParams {
2705
+ /**
2706
+ * An optional label of the workspace edit. This label is
2707
+ * presented in the user interface for example on an undo
2708
+ * stack to undo the workspace edit.
2709
+ */
2710
+ label?: string;
2711
+ /**
2712
+ * The edits to apply.
2713
+ */
2714
+ edit: WorkspaceEdit;
2715
+ }
2716
+ /**
2717
+ * The result returned from the apply workspace edit request.
2718
+ *
2719
+ * @since 3.17 renamed from ApplyWorkspaceEditResponse
2720
+ */
2721
+ export interface ApplyWorkspaceEditResult {
2722
+ /**
2723
+ * Indicates whether the edit was applied or not.
2724
+ */
2725
+ applied: boolean;
2726
+ /**
2727
+ * An optional textual description for why the edit was not applied.
2728
+ * This may be used by the server for diagnostic logging or to provide
2729
+ * a suitable error for a request that triggered the edit.
2730
+ */
2731
+ failureReason?: string;
2732
+ /**
2733
+ * Depending on the client's failure handling strategy `failedChange` might
2734
+ * contain the index of the change that failed. This property is only available
2735
+ * if the client signals a `failureHandlingStrategy` in its client capabilities.
2736
+ */
2737
+ failedChange?: uinteger;
2738
+ }
2739
+ /**
2740
+ * @deprecated Use ApplyWorkspaceEditResult instead.
2741
+ */
2742
+ export declare type ApplyWorkspaceEditResponse = ApplyWorkspaceEditResult;
2743
+ /**
2744
+ * A request sent from the server to the client to modified certain resources.
2745
+ */
2746
+ export declare namespace ApplyWorkspaceEditRequest {
2747
+ const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, never, void, void>;
2748
+ }
2749
+ export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, };
2750
+ export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };