vscode-languageserver-protocol 3.15.0-next.1 → 3.15.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/protocol.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { RequestType, RequestType0, NotificationType, NotificationType0 } from 'vscode-jsonrpc';
2
- import { TextDocumentContentChangeEvent, Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, WorkspaceSymbolParams, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, TextDocumentSaveReason, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, DocumentSymbolParams, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol } from 'vscode-languageserver-types';
3
- import { ImplementationRequest, ImplementationClientCapabilities, ImplementationServerCapabilities } from './protocol.implementation';
4
- import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionServerCapabilities } from './protocol.typeDefinition';
1
+ import { RequestType, RequestType0, NotificationType, NotificationType0, ProgressToken, ProgressType } from 'vscode-jsonrpc';
2
+ import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag } from 'vscode-languageserver-types';
3
+ import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions } from './protocol.implementation';
4
+ import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions } from './protocol.typeDefinition';
5
5
  import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders';
6
6
  import { ConfigurationRequest, ConfigurationParams, ConfigurationItem, ConfigurationClientCapabilities } from './protocol.configuration';
7
- import { DocumentColorRequest, ColorPresentationRequest, ColorProviderOptions, DocumentColorParams, ColorPresentationParams, ColorServerCapabilities, ColorClientCapabilities } from './protocol.colorProvider';
8
- import { FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities } from './protocol.foldingRange';
9
- import { DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities } from './protocol.declaration';
10
- import { SelectionRangeClientCapabilities, SelectionRangeProviderOptions, SelectionRangeRequest, SelectionRangeServerCapabilities, SelectionRangeKind, SelectionRange } from './protocol.selectionRange';
7
+ import { DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorClientCapabilities, DocumentColorRegistrationOptions } from './protocol.colorProvider';
8
+ import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions } from './protocol.foldingRange';
9
+ import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions, DeclarationRegistrationOptions } from './protocol.declaration';
10
+ import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange';
11
11
  /**
12
12
  * A document filter denotes a document by different properties like
13
13
  * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
@@ -46,6 +46,10 @@ export declare type DocumentFilter = {
46
46
  /** A glob pattern, like `*.{ts,js}`. */
47
47
  pattern: string;
48
48
  };
49
+ /**
50
+ * The DocumentFilter namespace provides helper functions to work with
51
+ * [DocumentFilter](#DocumentFilter) literals.
52
+ */
49
53
  export declare namespace DocumentFilter {
50
54
  function is(value: any): value is DocumentFilter;
51
55
  }
@@ -55,6 +59,13 @@ export declare namespace DocumentFilter {
55
59
  * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
56
60
  */
57
61
  export declare type DocumentSelector = (string | DocumentFilter)[];
62
+ /**
63
+ * The DocumentSelector namespace provides helper functions to work with
64
+ * [DocumentSelector](#DocumentSelector)s.
65
+ */
66
+ export declare namespace DocumentSelector {
67
+ function is(value: any[] | undefined | null): value is DocumentSelector;
68
+ }
58
69
  /**
59
70
  * General parameters to to register for an notification or to register a provider.
60
71
  */
@@ -107,6 +118,19 @@ export interface UnregistrationParams {
107
118
  export declare namespace UnregistrationRequest {
108
119
  const type: RequestType<UnregistrationParams, void, void, void>;
109
120
  }
121
+ export interface WorkDoneProgressParams {
122
+ /**
123
+ * An optional token that a server can use to report work done progress.
124
+ */
125
+ workDoneToken?: ProgressToken;
126
+ }
127
+ export interface PartialResultParams {
128
+ /**
129
+ * An optional token that a server can use to report partial results (e.g. streaming) to
130
+ * the client.
131
+ */
132
+ partialResultToken?: ProgressToken;
133
+ }
110
134
  /**
111
135
  * A parameter literal used in requests to pass a text document and a position inside that
112
136
  * document.
@@ -176,76 +200,23 @@ export interface WorkspaceClientCapabilities {
176
200
  /**
177
201
  * Capabilities specific to `WorkspaceEdit`s
178
202
  */
179
- workspaceEdit?: {
180
- /**
181
- * The client supports versioned document changes in `WorkspaceEdit`s
182
- */
183
- documentChanges?: boolean;
184
- /**
185
- * The resource operations the client supports. Clients should at least
186
- * support 'create', 'rename' and 'delete' files and folders.
187
- */
188
- resourceOperations?: ResourceOperationKind[];
189
- /**
190
- * The failure handling strategy of a client if applying the workspace edit
191
- * failes.
192
- */
193
- failureHandling?: FailureHandlingKind;
194
- };
203
+ workspaceEdit?: WorkspaceEditClientCapabilities;
195
204
  /**
196
205
  * Capabilities specific to the `workspace/didChangeConfiguration` notification.
197
206
  */
198
- didChangeConfiguration?: {
199
- /**
200
- * Did change configuration notification supports dynamic registration.
201
- */
202
- dynamicRegistration?: boolean;
203
- };
207
+ didChangeConfiguration?: DidChangeConfigurationClientCapabilities;
204
208
  /**
205
209
  * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
206
210
  */
207
- didChangeWatchedFiles?: {
208
- /**
209
- * Did change watched files notification supports dynamic registration. Please note
210
- * that the current protocol doesn't support static configuration for file changes
211
- * from the server side.
212
- */
213
- dynamicRegistration?: boolean;
214
- };
211
+ didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities;
215
212
  /**
216
213
  * Capabilities specific to the `workspace/symbol` request.
217
214
  */
218
- symbol?: {
219
- /**
220
- * Symbol request supports dynamic registration.
221
- */
222
- dynamicRegistration?: boolean;
223
- /**
224
- * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
225
- */
226
- symbolKind?: {
227
- /**
228
- * The symbol kind values the client supports. When this
229
- * property exists the client also guarantees that it will
230
- * handle values outside its set gracefully and falls back
231
- * to a default value when unknown.
232
- *
233
- * If this property is not present the client only supports
234
- * the symbol kinds from `File` to `Array` as defined in
235
- * the initial version of the protocol.
236
- */
237
- valueSet?: SymbolKind[];
238
- };
239
- };
215
+ symbol?: WorkspaceSymbolClientCapabilities;
240
216
  /**
241
217
  * Capabilities specific to the `workspace/executeCommand` request.
242
218
  */
243
- executeCommand?: {
244
- /**
245
- * Execute command supports dynamic registration.
246
- */
247
- dynamicRegistration?: boolean;
248
- };
219
+ executeCommand?: ExecuteCommandClientCapabilities;
249
220
  }
250
221
  /**
251
222
  * Text document specific client capabilities.
@@ -254,289 +225,101 @@ export interface TextDocumentClientCapabilities {
254
225
  /**
255
226
  * Defines which synchronization capabilities the client supports.
256
227
  */
257
- synchronization?: {
258
- /**
259
- * Whether text document synchronization supports dynamic registration.
260
- */
261
- dynamicRegistration?: boolean;
262
- /**
263
- * The client supports sending will save notifications.
264
- */
265
- willSave?: boolean;
266
- /**
267
- * The client supports sending a will save request and
268
- * waits for a response providing text edits which will
269
- * be applied to the document before it is saved.
270
- */
271
- willSaveWaitUntil?: boolean;
272
- /**
273
- * The client supports did save notifications.
274
- */
275
- didSave?: boolean;
276
- };
228
+ synchronization?: TextDocumentSyncClientCapabilities;
277
229
  /**
278
230
  * Capabilities specific to the `textDocument/completion`
279
231
  */
280
- completion?: {
281
- /**
282
- * Whether completion supports dynamic registration.
283
- */
284
- dynamicRegistration?: boolean;
285
- /**
286
- * The client supports the following `CompletionItem` specific
287
- * capabilities.
288
- */
289
- completionItem?: {
290
- /**
291
- * Client supports snippets as insert text.
292
- *
293
- * A snippet can define tab stops and placeholders with `$1`, `$2`
294
- * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
295
- * the end of the snippet. Placeholders with equal identifiers are linked,
296
- * that is typing in one will update others too.
297
- */
298
- snippetSupport?: boolean;
299
- /**
300
- * Client supports commit characters on a completion item.
301
- */
302
- commitCharactersSupport?: boolean;
303
- /**
304
- * Client supports the follow content formats for the documentation
305
- * property. The order describes the preferred format of the client.
306
- */
307
- documentationFormat?: MarkupKind[];
308
- /**
309
- * Client supports the deprecated property on a completion item.
310
- */
311
- deprecatedSupport?: boolean;
312
- /**
313
- * Client supports the preselect property on a completion item.
314
- */
315
- preselectSupport?: boolean;
316
- };
317
- completionItemKind?: {
318
- /**
319
- * The completion item kind values the client supports. When this
320
- * property exists the client also guarantees that it will
321
- * handle values outside its set gracefully and falls back
322
- * to a default value when unknown.
323
- *
324
- * If this property is not present the client only supports
325
- * the completion items kinds from `Text` to `Reference` as defined in
326
- * the initial version of the protocol.
327
- */
328
- valueSet?: CompletionItemKind[];
329
- };
330
- /**
331
- * The client supports to send additional context information for a
332
- * `textDocument/completion` requestion.
333
- */
334
- contextSupport?: boolean;
335
- };
232
+ completion?: CompletionClientCapabilities;
336
233
  /**
337
234
  * Capabilities specific to the `textDocument/hover`
338
235
  */
339
- hover?: {
340
- /**
341
- * Whether hover supports dynamic registration.
342
- */
343
- dynamicRegistration?: boolean;
344
- /**
345
- * Client supports the follow content formats for the content
346
- * property. The order describes the preferred format of the client.
347
- */
348
- contentFormat?: MarkupKind[];
349
- };
236
+ hover?: HoverClientCapabilities;
350
237
  /**
351
238
  * Capabilities specific to the `textDocument/signatureHelp`
352
239
  */
353
- signatureHelp?: {
354
- /**
355
- * Whether signature help supports dynamic registration.
356
- */
357
- dynamicRegistration?: boolean;
358
- /**
359
- * The client supports the following `SignatureInformation`
360
- * specific properties.
361
- */
362
- signatureInformation?: {
363
- /**
364
- * Client supports the follow content formats for the documentation
365
- * property. The order describes the preferred format of the client.
366
- */
367
- documentationFormat?: MarkupKind[];
368
- /**
369
- * Client capabilities specific to parameter information.
370
- */
371
- parameterInformation?: {
372
- /**
373
- * The client supports processing label offsets instead of a
374
- * simple label string.
375
- */
376
- labelOffsetSupport?: boolean;
377
- };
378
- };
379
- };
240
+ signatureHelp?: SignatureHelpClientCapabilities;
380
241
  /**
381
- * Capabilities specific to the `textDocument/references`
242
+ * Capabilities specific to the `textDocument/declaration`
243
+ *
244
+ * @since 3.14.0
382
245
  */
383
- references?: {
384
- /**
385
- * Whether references supports dynamic registration.
386
- */
387
- dynamicRegistration?: boolean;
388
- };
246
+ declaration?: DeclarationClientCapabilities;
389
247
  /**
390
- * Capabilities specific to the `textDocument/documentHighlight`
248
+ * Capabilities specific to the `textDocument/definition`
391
249
  */
392
- documentHighlight?: {
393
- /**
394
- * Whether document highlight supports dynamic registration.
395
- */
396
- dynamicRegistration?: boolean;
397
- };
250
+ definition?: DefinitionClientCapabilities;
398
251
  /**
399
- * Capabilities specific to the `textDocument/documentSymbol`
252
+ * Capabilities specific to the `textDocument/typeDefinition`
253
+ *
254
+ * @since 3.6.0
400
255
  */
401
- documentSymbol?: {
402
- /**
403
- * Whether document symbol supports dynamic registration.
404
- */
405
- dynamicRegistration?: boolean;
406
- /**
407
- * Specific capabilities for the `SymbolKind`.
408
- */
409
- symbolKind?: {
410
- /**
411
- * The symbol kind values the client supports. When this
412
- * property exists the client also guarantees that it will
413
- * handle values outside its set gracefully and falls back
414
- * to a default value when unknown.
415
- *
416
- * If this property is not present the client only supports
417
- * the symbol kinds from `File` to `Array` as defined in
418
- * the initial version of the protocol.
419
- */
420
- valueSet?: SymbolKind[];
421
- };
422
- /**
423
- * The client support hierarchical document symbols.
424
- */
425
- hierarchicalDocumentSymbolSupport?: boolean;
426
- };
256
+ typeDefinition?: TypeDefinitionClientCapabilities;
427
257
  /**
428
- * Capabilities specific to the `textDocument/formatting`
258
+ * Capabilities specific to the `textDocument/implementation`
259
+ *
260
+ * @since 3.6.0
429
261
  */
430
- formatting?: {
431
- /**
432
- * Whether formatting supports dynamic registration.
433
- */
434
- dynamicRegistration?: boolean;
435
- };
262
+ implementation?: ImplementationClientCapabilities;
436
263
  /**
437
- * Capabilities specific to the `textDocument/rangeFormatting`
264
+ * Capabilities specific to the `textDocument/references`
438
265
  */
439
- rangeFormatting?: {
440
- /**
441
- * Whether range formatting supports dynamic registration.
442
- */
443
- dynamicRegistration?: boolean;
444
- };
266
+ references?: ReferenceClientCapabilities;
445
267
  /**
446
- * Capabilities specific to the `textDocument/onTypeFormatting`
268
+ * Capabilities specific to the `textDocument/documentHighlight`
447
269
  */
448
- onTypeFormatting?: {
449
- /**
450
- * Whether on type formatting supports dynamic registration.
451
- */
452
- dynamicRegistration?: boolean;
453
- };
270
+ documentHighlight?: DocumentHighlightClientCapabilities;
454
271
  /**
455
- * Capabilities specific to the `textDocument/definition`
272
+ * Capabilities specific to the `textDocument/documentSymbol`
456
273
  */
457
- definition?: {
458
- /**
459
- * Whether definition supports dynamic registration.
460
- */
461
- dynamicRegistration?: boolean;
462
- /**
463
- * The client supports additional metadata in the form of definition links.
464
- */
465
- linkSupport?: boolean;
466
- };
274
+ documentSymbol?: DocumentSymbolClientCapabilities;
467
275
  /**
468
276
  * Capabilities specific to the `textDocument/codeAction`
469
277
  */
470
- codeAction?: {
471
- /**
472
- * Whether code action supports dynamic registration.
473
- */
474
- dynamicRegistration?: boolean;
475
- /**
476
- * The client support code action literals as a valid
477
- * response of the `textDocument/codeAction` request.
478
- */
479
- codeActionLiteralSupport?: {
480
- /**
481
- * The code action kind is support with the following value
482
- * set.
483
- */
484
- codeActionKind: {
485
- /**
486
- * The code action kind values the client supports. When this
487
- * property exists the client also guarantees that it will
488
- * handle values outside its set gracefully and falls back
489
- * to a default value when unknown.
490
- */
491
- valueSet: CodeActionKind[];
492
- };
493
- };
494
- };
278
+ codeAction?: CodeActionClientCapabilities;
495
279
  /**
496
280
  * Capabilities specific to the `textDocument/codeLens`
497
281
  */
498
- codeLens?: {
499
- /**
500
- * Whether code lens supports dynamic registration.
501
- */
502
- dynamicRegistration?: boolean;
503
- };
282
+ codeLens?: CodeLensClientCapabilities;
504
283
  /**
505
284
  * Capabilities specific to the `textDocument/documentLink`
506
285
  */
507
- documentLink?: {
508
- /**
509
- * Whether document link supports dynamic registration.
510
- */
511
- dynamicRegistration?: boolean;
512
- };
286
+ documentLink?: DocumentLinkClientCapabilities;
287
+ /**
288
+ * Capabilities specific to the `textDocument/documentColor`
289
+ */
290
+ colorProvider?: DocumentColorClientCapabilities;
291
+ /**
292
+ * Capabilities specific to the `textDocument/formatting`
293
+ */
294
+ formatting?: DocumentFormattingClientCapabilities;
295
+ /**
296
+ * Capabilities specific to the `textDocument/rangeFormatting`
297
+ */
298
+ rangeFormatting?: DocumentRangeFormattingClientCapabilities;
299
+ /**
300
+ * Capabilities specific to the `textDocument/onTypeFormatting`
301
+ */
302
+ onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities;
513
303
  /**
514
304
  * Capabilities specific to the `textDocument/rename`
515
305
  */
516
- rename?: {
517
- /**
518
- * Whether rename supports dynamic registration.
519
- */
520
- dynamicRegistration?: boolean;
521
- /**
522
- * Client supports testing for validity of rename operations
523
- * before execution.
524
- */
525
- prepareSupport?: boolean;
526
- };
306
+ rename?: RenameClientCapabilities;
307
+ /**
308
+ * Capabilities specific to `textDocument/foldingRange` requests.
309
+ *
310
+ * @since 3.10.0
311
+ */
312
+ foldingRange?: FoldingRangeClientCapabilities;
313
+ /**
314
+ * Capabilities specific to `textDocument/selectionRange` requests
315
+ *
316
+ * @since 3.15.0
317
+ */
318
+ selectionRange?: SelectionRangeClientCapabilities;
527
319
  /**
528
320
  * Capabilities specific to `textDocument/publishDiagnostics`.
529
321
  */
530
- publishDiagnostics?: {
531
- /**
532
- * Whether the clients accepts diagnostics with related information.
533
- */
534
- relatedInformation?: boolean;
535
- /**
536
- * Client supports the tag property to provide meta data about a diagnostic.
537
- */
538
- tagSupport?: boolean;
539
- };
322
+ publishDiagnostics?: PublishDiagnosticsClientCapabilities;
540
323
  }
541
324
  /**
542
325
  * Defines the capabilities provided by the client.
@@ -551,33 +334,15 @@ export interface _ClientCapabilities {
551
334
  */
552
335
  textDocument?: TextDocumentClientCapabilities;
553
336
  /**
554
- * Experimental client capabilities.
555
- */
556
- experimental?: any;
557
- }
558
- export declare type ClientCapabilities = _ClientCapabilities & ImplementationClientCapabilities & TypeDefinitionClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & ColorClientCapabilities & FoldingRangeClientCapabilities & DeclarationClientCapabilities & SelectionRangeClientCapabilities;
559
- /**
560
- * Defines how the host (editor) should sync
561
- * document changes to the language server.
562
- */
563
- export declare namespace TextDocumentSyncKind {
564
- /**
565
- * Documents should not be synced at all.
566
- */
567
- const None = 0;
568
- /**
569
- * Documents are synced by always sending the full content
570
- * of the document.
337
+ * Window specific client capabilities.
571
338
  */
572
- const Full = 1;
339
+ window?: object;
573
340
  /**
574
- * Documents are synced by sending the full content on open.
575
- * After that only incremental updates to the document are
576
- * send.
341
+ * Experimental client capabilities.
577
342
  */
578
- const Incremental = 2;
343
+ experimental?: any;
579
344
  }
580
- export declare type TextDocumentSyncKind = 0 | 1 | 2;
345
+ export declare type ClientCapabilities = _ClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & SelectionRangeClientCapabilities;
581
346
  /**
582
347
  * Static registration options to be returned in the initialize
583
348
  * request.
@@ -589,6 +354,15 @@ export interface StaticRegistrationOptions {
589
354
  */
590
355
  id?: string;
591
356
  }
357
+ /**
358
+ * The StaticRegistrationOptions namespace provides helper functions to work with
359
+ * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
360
+ */
361
+ export declare namespace StaticRegistrationOptions {
362
+ function hasId(value: object): value is {
363
+ id: string;
364
+ };
365
+ }
592
366
  /**
593
367
  * General text document registration options.
594
368
  */
@@ -600,177 +374,84 @@ export interface TextDocumentRegistrationOptions {
600
374
  documentSelector: DocumentSelector | null;
601
375
  }
602
376
  /**
603
- * Completion options.
377
+ * The TextDocumentRegistrationOptions namespace provides helper functions to work with
378
+ * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
604
379
  */
605
- export interface CompletionOptions {
606
- /**
607
- * Most tools trigger completion request automatically without explicitly requesting
608
- * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
609
- * starts to type an identifier. For example if the user types `c` in a JavaScript file
610
- * code complete will automatically pop up present `console` besides others as a
611
- * completion item. Characters that make up identifiers don't need to be listed here.
612
- *
613
- * If code complete should automatically be trigger on characters not being valid inside
614
- * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
615
- */
616
- triggerCharacters?: string[];
617
- /**
618
- * The list of all possible characters that commit a completion. This field can be used
619
- * if clients don't support individual commmit characters per completion item. See
620
- * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
621
- */
622
- allCommitCharacters?: string[];
623
- /**
624
- * The server provides support to resolve additional
625
- * information for a completion item.
626
- */
627
- resolveProvider?: boolean;
380
+ export declare namespace TextDocumentRegistrationOptions {
381
+ function is(value: any): value is TextDocumentRegistrationOptions;
628
382
  }
629
383
  /**
630
- * Signature help options.
384
+ * Save options.
631
385
  */
632
- export interface SignatureHelpOptions {
386
+ export interface SaveOptions {
633
387
  /**
634
- * The characters that trigger signature help
635
- * automatically.
388
+ * The client is supposed to include the content on save.
636
389
  */
637
- triggerCharacters?: string[];
390
+ includeText?: boolean;
638
391
  }
639
- /**
640
- * Code Action options.
641
- */
642
- export interface CodeActionOptions {
643
- /**
644
- * CodeActionKinds that this server may return.
645
- *
646
- * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
647
- * may list out every specific kind they provide.
648
- */
649
- codeActionKinds?: CodeActionKind[];
392
+ export interface WorkDoneProgressOptions {
393
+ workDoneProgress?: boolean;
650
394
  }
651
395
  /**
652
- * Code Lens options.
396
+ * The WorkDoneProgressOptions namespace provides helper functions to work with
397
+ * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
653
398
  */
654
- export interface CodeLensOptions {
655
- /**
656
- * Code lens has a resolve provider as well.
657
- */
658
- resolveProvider?: boolean;
399
+ export declare namespace WorkDoneProgressOptions {
400
+ function is(value: any): value is WorkDoneProgressOptions;
401
+ function hasWorkDoneProgress(value: any): value is {
402
+ workDoneProgress: boolean;
403
+ };
659
404
  }
660
405
  /**
661
- * Format document on type options
406
+ * Defines the capabilities provided by a language
407
+ * server.
662
408
  */
663
- export interface DocumentOnTypeFormattingOptions {
409
+ export interface _ServerCapabilities<T = any> {
664
410
  /**
665
- * A character on which formatting should be triggered, like `}`.
411
+ * Defines how text documents are synced. Is either a detailed structure defining each notification or
412
+ * for backwards compatibility the TextDocumentSyncKind number.
666
413
  */
667
- firstTriggerCharacter: string;
668
- /**
669
- * More trigger characters.
670
- */
671
- moreTriggerCharacter?: string[];
672
- }
673
- /**
674
- * Rename options
675
- */
676
- export interface RenameOptions {
677
- /**
678
- * Renames should be checked and tested before being executed.
679
- */
680
- prepareProvider?: boolean;
681
- }
682
- /**
683
- * Document link options
684
- */
685
- export interface DocumentLinkOptions {
686
- /**
687
- * Document links have a resolve provider as well.
688
- */
689
- resolveProvider?: boolean;
690
- }
691
- /**
692
- * Execute command options.
693
- */
694
- export interface ExecuteCommandOptions {
695
- /**
696
- * The commands to be executed on the server
697
- */
698
- commands: string[];
699
- }
700
- /**
701
- * Save options.
702
- */
703
- export interface SaveOptions {
704
- /**
705
- * The client is supposed to include the content on save.
706
- */
707
- includeText?: boolean;
708
- }
709
- export interface TextDocumentSyncOptions {
710
- /**
711
- * Open and close notifications are sent to the server.
712
- */
713
- openClose?: boolean;
714
- /**
715
- * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
716
- * and TextDocumentSyncKind.Incremental.
717
- */
718
- change?: TextDocumentSyncKind;
719
- /**
720
- * Will save notifications are sent to the server.
721
- */
722
- willSave?: boolean;
414
+ textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
723
415
  /**
724
- * Will save wait until requests are sent to the server.
416
+ * The server provides completion support.
725
417
  */
726
- willSaveWaitUntil?: boolean;
418
+ completionProvider?: CompletionOptions;
727
419
  /**
728
- * Save notifications are sent to the server.
420
+ * The server provides hover support.
729
421
  */
730
- save?: SaveOptions;
731
- }
732
- /**
733
- * Defines the capabilities provided by a language
734
- * server.
735
- */
736
- export interface _ServerCapabilities {
422
+ hoverProvider?: boolean | HoverOptions;
737
423
  /**
738
- * Defines how text documents are synced. Is either a detailed structure defining each notification or
739
- * for backwards compatibility the TextDocumentSyncKind number.
424
+ * The server provides signature help support.
740
425
  */
741
- textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
426
+ signatureHelpProvider?: SignatureHelpOptions;
742
427
  /**
743
- * The server provides hover support.
428
+ * The server provides Goto Declaration support.
744
429
  */
745
- hoverProvider?: boolean;
430
+ declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions;
746
431
  /**
747
- * The server provides completion support.
432
+ * The server provides goto definition support.
748
433
  */
749
- completionProvider?: CompletionOptions;
434
+ definitionProvider?: boolean | DefinitionOptions;
750
435
  /**
751
- * The server provides signature help support.
436
+ * The server provides Goto Type Definition support.
752
437
  */
753
- signatureHelpProvider?: SignatureHelpOptions;
438
+ typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions;
754
439
  /**
755
- * The server provides goto definition support.
440
+ * The server provides Goto Implementation support.
756
441
  */
757
- definitionProvider?: boolean;
442
+ implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions;
758
443
  /**
759
444
  * The server provides find references support.
760
445
  */
761
- referencesProvider?: boolean;
446
+ referencesProvider?: boolean | ReferenceOptions;
762
447
  /**
763
448
  * The server provides document highlight support.
764
449
  */
765
- documentHighlightProvider?: boolean;
450
+ documentHighlightProvider?: boolean | DocumentHighlightOptions;
766
451
  /**
767
452
  * The server provides document symbol support.
768
453
  */
769
- documentSymbolProvider?: boolean;
770
- /**
771
- * The server provides workspace symbol support.
772
- */
773
- workspaceSymbolProvider?: boolean;
454
+ documentSymbolProvider?: boolean | DocumentSymbolOptions;
774
455
  /**
775
456
  * The server provides code actions. CodeActionOptions may only be
776
457
  * specified if the client states that it supports
@@ -781,27 +462,30 @@ export interface _ServerCapabilities {
781
462
  * The server provides code lens.
782
463
  */
783
464
  codeLensProvider?: CodeLensOptions;
465
+ /**
466
+ * The server provides document link support.
467
+ */
468
+ documentLinkProvider?: DocumentLinkOptions;
469
+ /**
470
+ * The server provides color provider support.
471
+ */
472
+ colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;
473
+ /**
474
+ * The server provides workspace symbol support.
475
+ */
476
+ workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions;
784
477
  /**
785
478
  * The server provides document formatting.
786
479
  */
787
- documentFormattingProvider?: boolean;
480
+ documentFormattingProvider?: boolean | DocumentFormattingOptions;
788
481
  /**
789
482
  * The server provides document range formatting.
790
483
  */
791
- documentRangeFormattingProvider?: boolean;
484
+ documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions;
792
485
  /**
793
486
  * The server provides document formatting on typing.
794
487
  */
795
- documentOnTypeFormattingProvider?: {
796
- /**
797
- * A character on which formatting should be triggered, like `}`.
798
- */
799
- firstTriggerCharacter: string;
800
- /**
801
- * More trigger characters.
802
- */
803
- moreTriggerCharacter?: string[];
804
- };
488
+ documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions;
805
489
  /**
806
490
  * The server provides rename support. RenameOptions may only be
807
491
  * specified if the client states that it supports
@@ -809,9 +493,13 @@ export interface _ServerCapabilities {
809
493
  */
810
494
  renameProvider?: boolean | RenameOptions;
811
495
  /**
812
- * The server provides document link support.
496
+ * The server provides folding provider support.
813
497
  */
814
- documentLinkProvider?: DocumentLinkOptions;
498
+ foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions;
499
+ /**
500
+ * The server provides selection range support.
501
+ */
502
+ selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions;
815
503
  /**
816
504
  * The server provides execute command support.
817
505
  */
@@ -819,9 +507,9 @@ export interface _ServerCapabilities {
819
507
  /**
820
508
  * Experimental server capabilities.
821
509
  */
822
- experimental?: any;
510
+ experimental?: T;
823
511
  }
824
- export declare type ServerCapabilities = _ServerCapabilities & ImplementationServerCapabilities & TypeDefinitionServerCapabilities & WorkspaceFoldersServerCapabilities & ColorServerCapabilities & FoldingRangeServerCapabilities & DeclarationServerCapabilities & SelectionRangeServerCapabilities;
512
+ export declare type ServerCapabilities<T = any> = _ServerCapabilities<T> & WorkspaceFoldersServerCapabilities;
825
513
  /**
826
514
  * The initialize request is sent from the client to the server.
827
515
  * It is sent once as the request after starting up the server.
@@ -830,17 +518,32 @@ export declare type ServerCapabilities = _ServerCapabilities & ImplementationSer
830
518
  * resolves to such.
831
519
  */
832
520
  export declare namespace InitializeRequest {
833
- const type: RequestType<InitializeParams, InitializeResult, InitializeError, void>;
521
+ const type: RequestType<_InitializeParams & WorkspaceFoldersInitializeParams & WorkDoneProgressParams, InitializeResult<any>, InitializeError, void>;
834
522
  }
835
523
  /**
836
524
  * The initialize parameters
837
525
  */
838
- export interface _InitializeParams {
526
+ export interface _InitializeParams extends WorkDoneProgressParams {
839
527
  /**
840
528
  * The process Id of the parent process that started
841
529
  * the server.
842
530
  */
843
531
  processId: number | null;
532
+ /**
533
+ * Information about the client
534
+ *
535
+ * @since 3.15.0
536
+ */
537
+ clientInfo?: {
538
+ /**
539
+ * The name of the client as defined by the client.
540
+ */
541
+ name: string;
542
+ /**
543
+ * The client's version as defined by the client.
544
+ */
545
+ version?: string;
546
+ };
844
547
  /**
845
548
  * The rootPath of the workspace. Is null
846
549
  * if no folder is open.
@@ -855,7 +558,7 @@ export interface _InitializeParams {
855
558
  *
856
559
  * @deprecated in favour of workspaceFolders.
857
560
  */
858
- rootUri: string | null;
561
+ rootUri: DocumentUri | null;
859
562
  /**
860
563
  * The capabilities provided by the client (editor or tool)
861
564
  */
@@ -873,11 +576,26 @@ export declare type InitializeParams = _InitializeParams & WorkspaceFoldersIniti
873
576
  /**
874
577
  * The result returned from an initialize request.
875
578
  */
876
- export interface InitializeResult {
579
+ export interface InitializeResult<T = any> {
877
580
  /**
878
581
  * The capabilities the language server provides.
879
582
  */
880
- capabilities: ServerCapabilities;
583
+ capabilities: ServerCapabilities<T>;
584
+ /**
585
+ * Information about the server.
586
+ *
587
+ * @since 3.15.0
588
+ */
589
+ serverInfo?: {
590
+ /**
591
+ * The name of the server as defined by the server.
592
+ */
593
+ name: string;
594
+ /**
595
+ * The servers's version as defined by the server.
596
+ */
597
+ version?: string;
598
+ };
881
599
  /**
882
600
  * Custom initialization results.
883
601
  */
@@ -933,6 +651,12 @@ export declare namespace ShutdownRequest {
933
651
  export declare namespace ExitNotification {
934
652
  const type: NotificationType0<void>;
935
653
  }
654
+ export interface DidChangeConfigurationClientCapabilities {
655
+ /**
656
+ * Did change configuration notification supports dynamic registration.
657
+ */
658
+ dynamicRegistration?: boolean;
659
+ }
936
660
  /**
937
661
  * The configuration change notification is sent from the client to the server
938
662
  * when the client's configuration has changed. The notification contains
@@ -1049,6 +773,75 @@ export interface LogMessageParams {
1049
773
  export declare namespace TelemetryEventNotification {
1050
774
  const type: NotificationType<any, void>;
1051
775
  }
776
+ export interface TextDocumentSyncClientCapabilities {
777
+ /**
778
+ * Whether text document synchronization supports dynamic registration.
779
+ */
780
+ dynamicRegistration?: boolean;
781
+ /**
782
+ * The client supports sending will save notifications.
783
+ */
784
+ willSave?: boolean;
785
+ /**
786
+ * The client supports sending a will save request and
787
+ * waits for a response providing text edits which will
788
+ * be applied to the document before it is saved.
789
+ */
790
+ willSaveWaitUntil?: boolean;
791
+ /**
792
+ * The client supports did save notifications.
793
+ */
794
+ didSave?: boolean;
795
+ }
796
+ /**
797
+ * Defines how the host (editor) should sync
798
+ * document changes to the language server.
799
+ */
800
+ export declare namespace TextDocumentSyncKind {
801
+ /**
802
+ * Documents should not be synced at all.
803
+ */
804
+ const None = 0;
805
+ /**
806
+ * Documents are synced by always sending the full content
807
+ * of the document.
808
+ */
809
+ const Full = 1;
810
+ /**
811
+ * Documents are synced by sending the full content on open.
812
+ * After that only incremental updates to the document are
813
+ * send.
814
+ */
815
+ const Incremental = 2;
816
+ }
817
+ export declare type TextDocumentSyncKind = 0 | 1 | 2;
818
+ export interface TextDocumentSyncOptions {
819
+ /**
820
+ * Open and close notifications are sent to the server. If omitted open close notification should not
821
+ * be sent.
822
+ */
823
+ openClose?: boolean;
824
+ /**
825
+ * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
826
+ * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
827
+ */
828
+ change?: TextDocumentSyncKind;
829
+ /**
830
+ * If present will save notifications are sent to the server. If omitted the notification should not be
831
+ * sent.
832
+ */
833
+ willSave?: boolean;
834
+ /**
835
+ * If present will save wait until requests are sent to the server. If omitted the request should not be
836
+ * sent.
837
+ */
838
+ willSaveWaitUntil?: boolean;
839
+ /**
840
+ * If present save notifications are sent to the server. If omitted the notification should not be
841
+ * sent.
842
+ */
843
+ save?: SaveOptions;
844
+ }
1052
845
  /**
1053
846
  * The parameters send in a open text document notification
1054
847
  */
@@ -1071,6 +864,31 @@ export interface DidOpenTextDocumentParams {
1071
864
  export declare namespace DidOpenTextDocumentNotification {
1072
865
  const type: NotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
1073
866
  }
867
+ /**
868
+ * An event describing a change to a text document. If range and rangeLength are omitted
869
+ * the new text is considered to be the full content of the document.
870
+ */
871
+ export declare type TextDocumentContentChangeEvent = {
872
+ /**
873
+ * The range of the document that changed.
874
+ */
875
+ range: Range;
876
+ /**
877
+ * The optional length of the range that got replaced.
878
+ *
879
+ * @deprecated use range instead.
880
+ */
881
+ rangeLength?: number;
882
+ /**
883
+ * The new text for the provided range.
884
+ */
885
+ text: string;
886
+ } | {
887
+ /**
888
+ * The new text of the whole document.
889
+ */
890
+ text: string;
891
+ };
1074
892
  /**
1075
893
  * The change text document notification's parameters.
1076
894
  */
@@ -1151,6 +969,25 @@ export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistr
1151
969
  export declare namespace DidSaveTextDocumentNotification {
1152
970
  const type: NotificationType<DidSaveTextDocumentParams, TextDocumentSaveRegistrationOptions>;
1153
971
  }
972
+ /**
973
+ * Represents reasons why a text document is saved.
974
+ */
975
+ export declare namespace TextDocumentSaveReason {
976
+ /**
977
+ * Manually triggered, e.g. by the user pressing save, by starting debugging,
978
+ * or by an API call.
979
+ */
980
+ const Manual: 1;
981
+ /**
982
+ * Automatic after a delay.
983
+ */
984
+ const AfterDelay: 2;
985
+ /**
986
+ * When the editor lost focus.
987
+ */
988
+ const FocusOut: 3;
989
+ }
990
+ export declare type TextDocumentSaveReason = 1 | 2 | 3;
1154
991
  /**
1155
992
  * The parameters send in a will save text document notification.
1156
993
  */
@@ -1182,6 +1019,14 @@ export declare namespace WillSaveTextDocumentNotification {
1182
1019
  export declare namespace WillSaveTextDocumentWaitUntilRequest {
1183
1020
  const type: RequestType<WillSaveTextDocumentParams, TextEdit[] | null, void, TextDocumentRegistrationOptions>;
1184
1021
  }
1022
+ export interface DidChangeWatchedFilesClientCapabilities {
1023
+ /**
1024
+ * Did change watched files notification supports dynamic registration. Please note
1025
+ * that the current protocol doesn't support static configuration for file changes
1026
+ * from the server side.
1027
+ */
1028
+ dynamicRegistration?: boolean;
1029
+ }
1185
1030
  /**
1186
1031
  * The watched files notification is sent from the client to the server when
1187
1032
  * the client detects changes to file watched by the language client.
@@ -1223,7 +1068,7 @@ export interface FileEvent {
1223
1068
  /**
1224
1069
  * The file's uri.
1225
1070
  */
1226
- uri: string;
1071
+ uri: DocumentUri;
1227
1072
  /**
1228
1073
  * The change type.
1229
1074
  */
@@ -1271,11 +1116,25 @@ export declare namespace WatchKind {
1271
1116
  const Delete = 4;
1272
1117
  }
1273
1118
  /**
1274
- * Diagnostics notification are sent from the server to the client to signal
1275
- * results of validation runs.
1119
+ * The publish diagnostic client capabilities.
1276
1120
  */
1277
- export declare namespace PublishDiagnosticsNotification {
1278
- const type: NotificationType<PublishDiagnosticsParams, void>;
1121
+ export interface PublishDiagnosticsClientCapabilities {
1122
+ /**
1123
+ * Whether the clients accepts diagnostics with related information.
1124
+ */
1125
+ relatedInformation?: boolean;
1126
+ /**
1127
+ * Client supports the tag property to provide meta data about a diagnostic.
1128
+ * Clients supporting tags have to handle unknown tags gracefully.
1129
+ *
1130
+ * @since 3.15.0
1131
+ */
1132
+ tagSupport?: {
1133
+ /**
1134
+ * The tags supported by the client.
1135
+ */
1136
+ valueSet: DiagnosticTag[];
1137
+ };
1279
1138
  }
1280
1139
  /**
1281
1140
  * The publish diagnostic notification's parameters.
@@ -1284,9 +1143,11 @@ export interface PublishDiagnosticsParams {
1284
1143
  /**
1285
1144
  * The URI for which diagnostic information is reported.
1286
1145
  */
1287
- uri: string;
1146
+ uri: DocumentUri;
1288
1147
  /**
1289
1148
  * Optional the version number of the document the diagnostics are published for.
1149
+ *
1150
+ * @since 3.15.0
1290
1151
  */
1291
1152
  version?: number;
1292
1153
  /**
@@ -1295,9 +1156,84 @@ export interface PublishDiagnosticsParams {
1295
1156
  diagnostics: Diagnostic[];
1296
1157
  }
1297
1158
  /**
1298
- * Completion registration options.
1159
+ * Diagnostics notification are sent from the server to the client to signal
1160
+ * results of validation runs.
1299
1161
  */
1300
- export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions {
1162
+ export declare namespace PublishDiagnosticsNotification {
1163
+ const type: NotificationType<PublishDiagnosticsParams, void>;
1164
+ }
1165
+ /**
1166
+ * Completion client capabilities
1167
+ */
1168
+ export interface CompletionClientCapabilities {
1169
+ /**
1170
+ * Whether completion supports dynamic registration.
1171
+ */
1172
+ dynamicRegistration?: boolean;
1173
+ /**
1174
+ * The client supports the following `CompletionItem` specific
1175
+ * capabilities.
1176
+ */
1177
+ completionItem?: {
1178
+ /**
1179
+ * Client supports snippets as insert text.
1180
+ *
1181
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
1182
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1183
+ * the end of the snippet. Placeholders with equal identifiers are linked,
1184
+ * that is typing in one will update others too.
1185
+ */
1186
+ snippetSupport?: boolean;
1187
+ /**
1188
+ * Client supports commit characters on a completion item.
1189
+ */
1190
+ commitCharactersSupport?: boolean;
1191
+ /**
1192
+ * Client supports the follow content formats for the documentation
1193
+ * property. The order describes the preferred format of the client.
1194
+ */
1195
+ documentationFormat?: MarkupKind[];
1196
+ /**
1197
+ * Client supports the deprecated property on a completion item.
1198
+ */
1199
+ deprecatedSupport?: boolean;
1200
+ /**
1201
+ * Client supports the preselect property on a completion item.
1202
+ */
1203
+ preselectSupport?: boolean;
1204
+ /**
1205
+ * Client supports the tag property on a completion item. Clients supporting
1206
+ * tags have to handle unknown tags gracefully. Clients especially need to
1207
+ * preserve unknown tags when sending a completion item back to the server in
1208
+ * a resolve call.
1209
+ *
1210
+ * @since 3.15.0
1211
+ */
1212
+ tagSupport?: {
1213
+ /**
1214
+ * The tags supported by the client.
1215
+ */
1216
+ valueSet: CompletionItemTag[];
1217
+ };
1218
+ };
1219
+ completionItemKind?: {
1220
+ /**
1221
+ * The completion item kind values the client supports. When this
1222
+ * property exists the client also guarantees that it will
1223
+ * handle values outside its set gracefully and falls back
1224
+ * to a default value when unknown.
1225
+ *
1226
+ * If this property is not present the client only supports
1227
+ * the completion items kinds from `Text` to `Reference` as defined in
1228
+ * the initial version of the protocol.
1229
+ */
1230
+ valueSet?: CompletionItemKind[];
1231
+ };
1232
+ /**
1233
+ * The client supports to send additional context information for a
1234
+ * `textDocument/completion` requestion.
1235
+ */
1236
+ contextSupport?: boolean;
1301
1237
  }
1302
1238
  /**
1303
1239
  * How a completion was triggered
@@ -1336,50 +1272,266 @@ export interface CompletionContext {
1336
1272
  /**
1337
1273
  * Completion parameters
1338
1274
  */
1339
- export interface CompletionParams extends TextDocumentPositionParams {
1275
+ export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1340
1276
  /**
1341
1277
  * The completion context. This is only available it the client specifies
1342
- * to send this using `ClientCapabilities.textDocument.completion.contextSupport === true`
1278
+ * to send this using the client capability `textDocument.completion.contextSupport === true`
1343
1279
  */
1344
1280
  context?: CompletionContext;
1345
1281
  }
1346
1282
  /**
1347
- * Request to request completion at a given text document position. The request's
1348
- * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
1349
- * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
1350
- * or a Thenable that resolves to such.
1351
- *
1352
- * The request can delay the computation of the [`detail`](#CompletionItem.detail)
1353
- * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
1354
- * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
1355
- * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
1356
- */
1357
- export declare namespace CompletionRequest {
1358
- const type: RequestType<CompletionParams, CompletionList | CompletionItem[] | null, void, CompletionRegistrationOptions>;
1359
- }
1360
- /**
1361
- * Request to resolve additional information for a given completion item.The request's
1362
- * parameter is of type [CompletionItem](#CompletionItem) the response
1363
- * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
1283
+ * Completion options.
1364
1284
  */
1365
- export declare namespace CompletionResolveRequest {
1366
- const type: RequestType<CompletionItem, CompletionItem, void, void>;
1367
- }
1368
- /**
1285
+ export interface CompletionOptions extends WorkDoneProgressOptions {
1286
+ /**
1287
+ * Most tools trigger completion request automatically without explicitly requesting
1288
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
1289
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
1290
+ * code complete will automatically pop up present `console` besides others as a
1291
+ * completion item. Characters that make up identifiers don't need to be listed here.
1292
+ *
1293
+ * If code complete should automatically be trigger on characters not being valid inside
1294
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
1295
+ */
1296
+ triggerCharacters?: string[];
1297
+ /**
1298
+ * The list of all possible characters that commit a completion. This field can be used
1299
+ * if clients don't support individual commmit characters per completion item. See
1300
+ * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
1301
+ *
1302
+ * If a server provides both `allCommitCharacters` and commit characters on an individual
1303
+ * completion item the ones on the completion item win.
1304
+ *
1305
+ * @since 3.2.0
1306
+ */
1307
+ allCommitCharacters?: string[];
1308
+ /**
1309
+ * The server provides support to resolve additional
1310
+ * information for a completion item.
1311
+ */
1312
+ resolveProvider?: boolean;
1313
+ }
1314
+ /**
1315
+ * Registration options for a [CompletionRequest](#CompletionRequest).
1316
+ */
1317
+ export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions {
1318
+ }
1319
+ /**
1320
+ * Request to request completion at a given text document position. The request's
1321
+ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
1322
+ * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
1323
+ * or a Thenable that resolves to such.
1324
+ *
1325
+ * The request can delay the computation of the [`detail`](#CompletionItem.detail)
1326
+ * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
1327
+ * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
1328
+ * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
1329
+ */
1330
+ export declare namespace CompletionRequest {
1331
+ const type: RequestType<CompletionParams, CompletionList | CompletionItem[] | null, void, CompletionRegistrationOptions>;
1332
+ const resultType: ProgressType<CompletionItem[]>;
1333
+ }
1334
+ /**
1335
+ * Request to resolve additional information for a given completion item.The request's
1336
+ * parameter is of type [CompletionItem](#CompletionItem) the response
1337
+ * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
1338
+ */
1339
+ export declare namespace CompletionResolveRequest {
1340
+ const type: RequestType<CompletionItem, CompletionItem, void, void>;
1341
+ }
1342
+ export interface HoverClientCapabilities {
1343
+ /**
1344
+ * Whether hover supports dynamic registration.
1345
+ */
1346
+ dynamicRegistration?: boolean;
1347
+ /**
1348
+ * Client supports the follow content formats for the content
1349
+ * property. The order describes the preferred format of the client.
1350
+ */
1351
+ contentFormat?: MarkupKind[];
1352
+ }
1353
+ /**
1354
+ * Hover options.
1355
+ */
1356
+ export interface HoverOptions extends WorkDoneProgressOptions {
1357
+ }
1358
+ /**
1359
+ * Parameters for a [HoverRequest](#HoverRequest).
1360
+ */
1361
+ export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1362
+ }
1363
+ /**
1364
+ * Registration options for a [HoverRequest](#HoverRequest).
1365
+ */
1366
+ export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions {
1367
+ }
1368
+ /**
1369
1369
  * Request to request hover information at a given text document position. The request's
1370
1370
  * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
1371
1371
  * type [Hover](#Hover) or a Thenable that resolves to such.
1372
1372
  */
1373
1373
  export declare namespace HoverRequest {
1374
- const type: RequestType<TextDocumentPositionParams, Hover | null, void, TextDocumentRegistrationOptions>;
1374
+ const type: RequestType<HoverParams, Hover | null, void, HoverRegistrationOptions>;
1375
+ }
1376
+ /**
1377
+ * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1378
+ */
1379
+ export interface SignatureHelpClientCapabilities {
1380
+ /**
1381
+ * Whether signature help supports dynamic registration.
1382
+ */
1383
+ dynamicRegistration?: boolean;
1384
+ /**
1385
+ * The client supports the following `SignatureInformation`
1386
+ * specific properties.
1387
+ */
1388
+ signatureInformation?: {
1389
+ /**
1390
+ * Client supports the follow content formats for the documentation
1391
+ * property. The order describes the preferred format of the client.
1392
+ */
1393
+ documentationFormat?: MarkupKind[];
1394
+ /**
1395
+ * Client capabilities specific to parameter information.
1396
+ */
1397
+ parameterInformation?: {
1398
+ /**
1399
+ * The client supports processing label offsets instead of a
1400
+ * simple label string.
1401
+ *
1402
+ * @since 3.14.0
1403
+ */
1404
+ labelOffsetSupport?: boolean;
1405
+ };
1406
+ };
1407
+ /**
1408
+ * The client supports to send additional context information for a
1409
+ * `textDocument/signatureHelp` request. A client that opts into
1410
+ * contextSupport will also support the `retriggerCharacters` on
1411
+ * `SignatureHelpOptions`.
1412
+ *
1413
+ * @since 3.15.0
1414
+ */
1415
+ contextSupport?: boolean;
1416
+ }
1417
+ /**
1418
+ * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1419
+ */
1420
+ export interface SignatureHelpOptions extends WorkDoneProgressOptions {
1421
+ /**
1422
+ * List of characters that trigger signature help.
1423
+ */
1424
+ triggerCharacters?: string[];
1425
+ /**
1426
+ * List of characters that re-trigger signature help.
1427
+ *
1428
+ * These trigger characters are only active when signature help is already showing. All trigger characters
1429
+ * are also counted as re-trigger characters.
1430
+ *
1431
+ * @since 3.15.0
1432
+ */
1433
+ retriggerCharacters?: string[];
1375
1434
  }
1376
1435
  /**
1377
- * Signature help registration options.
1436
+ * How a signature help was triggered.
1437
+ *
1438
+ * @since 3.15.0
1439
+ */
1440
+ export declare namespace SignatureHelpTriggerKind {
1441
+ /**
1442
+ * Signature help was invoked manually by the user or by a command.
1443
+ */
1444
+ const Invoked: 1;
1445
+ /**
1446
+ * Signature help was triggered by a trigger character.
1447
+ */
1448
+ const TriggerCharacter: 2;
1449
+ /**
1450
+ * Signature help was triggered by the cursor moving or by the document content changing.
1451
+ */
1452
+ const ContentChange: 3;
1453
+ }
1454
+ export declare type SignatureHelpTriggerKind = 1 | 2 | 3;
1455
+ /**
1456
+ * Additional information about the context in which a signature help request was triggered.
1457
+ *
1458
+ * @since 3.15.0
1459
+ */
1460
+ export interface SignatureHelpContext {
1461
+ /**
1462
+ * Action that caused signature help to be triggered.
1463
+ */
1464
+ triggerKind: SignatureHelpTriggerKind;
1465
+ /**
1466
+ * Character that caused signature help to be triggered.
1467
+ *
1468
+ * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
1469
+ */
1470
+ triggerCharacter?: string;
1471
+ /**
1472
+ * `true` if signature help was already showing when it was triggered.
1473
+ *
1474
+ * Retriggers occur when the signature help is already active and can be caused by actions such as
1475
+ * typing a trigger character, a cursor move, or document content changes.
1476
+ */
1477
+ isRetrigger: boolean;
1478
+ /**
1479
+ * The currently active `SignatureHelp`.
1480
+ *
1481
+ * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
1482
+ * the user navigating through available signatures.
1483
+ */
1484
+ activeSignatureHelp?: SignatureHelp;
1485
+ }
1486
+ /**
1487
+ * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
1488
+ */
1489
+ export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1490
+ /**
1491
+ * The signature help context. This is only available if the client specifies
1492
+ * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
1493
+ *
1494
+ * @since 3.15.0
1495
+ */
1496
+ context?: SignatureHelpContext;
1497
+ }
1498
+ /**
1499
+ * Registration options for a [SignatureHelpRequest](#SignatureHelpRequest).
1378
1500
  */
1379
1501
  export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions {
1380
1502
  }
1381
1503
  export declare namespace SignatureHelpRequest {
1382
- const type: RequestType<TextDocumentPositionParams, SignatureHelp | null, void, SignatureHelpRegistrationOptions>;
1504
+ const type: RequestType<SignatureHelpParams, SignatureHelp | null, void, SignatureHelpRegistrationOptions>;
1505
+ }
1506
+ /**
1507
+ * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
1508
+ */
1509
+ export interface DefinitionClientCapabilities {
1510
+ /**
1511
+ * Whether definition supports dynamic registration.
1512
+ */
1513
+ dynamicRegistration?: boolean;
1514
+ /**
1515
+ * The client supports additional metadata in the form of definition links.
1516
+ *
1517
+ * @since 3.14.0
1518
+ */
1519
+ linkSupport?: boolean;
1520
+ }
1521
+ /**
1522
+ * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
1523
+ */
1524
+ export interface DefinitionOptions extends WorkDoneProgressOptions {
1525
+ }
1526
+ /**
1527
+ * Parameters for a [DefinitionRequest](#DefinitionRequest).
1528
+ */
1529
+ export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1530
+ }
1531
+ /**
1532
+ * Registration options for a [DefinitionRequest](#DefinitionRequest).
1533
+ */
1534
+ export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions {
1383
1535
  }
1384
1536
  /**
1385
1537
  * A request to resolve the definition location of a symbol at a given text
@@ -1389,14 +1541,34 @@ export declare namespace SignatureHelpRequest {
1389
1541
  * to such.
1390
1542
  */
1391
1543
  export declare namespace DefinitionRequest {
1392
- const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>;
1544
+ const type: RequestType<DefinitionParams, Location | Location[] | LocationLink[] | null, void, DefinitionRegistrationOptions>;
1545
+ const resultType: ProgressType<LocationLink[] | Location[]>;
1546
+ }
1547
+ /**
1548
+ * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
1549
+ */
1550
+ export interface ReferenceClientCapabilities {
1551
+ /**
1552
+ * Whether references supports dynamic registration.
1553
+ */
1554
+ dynamicRegistration?: boolean;
1393
1555
  }
1394
1556
  /**
1395
1557
  * Parameters for a [ReferencesRequest](#ReferencesRequest).
1396
1558
  */
1397
- export interface ReferenceParams extends TextDocumentPositionParams {
1559
+ export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1398
1560
  context: ReferenceContext;
1399
1561
  }
1562
+ /**
1563
+ * Reference options.
1564
+ */
1565
+ export interface ReferenceOptions extends WorkDoneProgressOptions {
1566
+ }
1567
+ /**
1568
+ * Registration options for a [ReferencesRequest](#ReferencesRequest).
1569
+ */
1570
+ export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions {
1571
+ }
1400
1572
  /**
1401
1573
  * A request to resolve project-wide references for the symbol denoted
1402
1574
  * by the given text document position. The request's parameter is of
@@ -1404,7 +1576,32 @@ export interface ReferenceParams extends TextDocumentPositionParams {
1404
1576
  * [Location[]](#Location) or a Thenable that resolves to such.
1405
1577
  */
1406
1578
  export declare namespace ReferencesRequest {
1407
- const type: RequestType<ReferenceParams, Location[] | null, void, TextDocumentRegistrationOptions>;
1579
+ const type: RequestType<ReferenceParams, Location[] | null, void, ReferenceRegistrationOptions>;
1580
+ const resultType: ProgressType<Location[]>;
1581
+ }
1582
+ /**
1583
+ * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1584
+ */
1585
+ export interface DocumentHighlightClientCapabilities {
1586
+ /**
1587
+ * Whether document highlight supports dynamic registration.
1588
+ */
1589
+ dynamicRegistration?: boolean;
1590
+ }
1591
+ /**
1592
+ * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1593
+ */
1594
+ export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1595
+ }
1596
+ /**
1597
+ * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1598
+ */
1599
+ export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
1600
+ }
1601
+ /**
1602
+ * Registration options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1603
+ */
1604
+ export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions {
1408
1605
  }
1409
1606
  /**
1410
1607
  * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
@@ -1413,7 +1610,56 @@ export declare namespace ReferencesRequest {
1413
1610
  * (#DocumentHighlight) or a Thenable that resolves to such.
1414
1611
  */
1415
1612
  export declare namespace DocumentHighlightRequest {
1416
- const type: RequestType<TextDocumentPositionParams, DocumentHighlight[] | null, void, TextDocumentRegistrationOptions>;
1613
+ const type: RequestType<DocumentHighlightParams, DocumentHighlight[] | null, void, DocumentHighlightRegistrationOptions>;
1614
+ const resultType: ProgressType<DocumentHighlight[]>;
1615
+ }
1616
+ /**
1617
+ * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1618
+ */
1619
+ export interface DocumentSymbolClientCapabilities {
1620
+ /**
1621
+ * Whether document symbol supports dynamic registration.
1622
+ */
1623
+ dynamicRegistration?: boolean;
1624
+ /**
1625
+ * Specific capabilities for the `SymbolKind`.
1626
+ */
1627
+ symbolKind?: {
1628
+ /**
1629
+ * The symbol kind values the client supports. When this
1630
+ * property exists the client also guarantees that it will
1631
+ * handle values outside its set gracefully and falls back
1632
+ * to a default value when unknown.
1633
+ *
1634
+ * If this property is not present the client only supports
1635
+ * the symbol kinds from `File` to `Array` as defined in
1636
+ * the initial version of the protocol.
1637
+ */
1638
+ valueSet?: SymbolKind[];
1639
+ };
1640
+ /**
1641
+ * The client support hierarchical document symbols.
1642
+ */
1643
+ hierarchicalDocumentSymbolSupport?: boolean;
1644
+ }
1645
+ /**
1646
+ * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1647
+ */
1648
+ export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams {
1649
+ /**
1650
+ * The text document.
1651
+ */
1652
+ textDocument: TextDocumentIdentifier;
1653
+ }
1654
+ /**
1655
+ * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1656
+ */
1657
+ export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
1658
+ }
1659
+ /**
1660
+ * Registration options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1661
+ */
1662
+ export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions {
1417
1663
  }
1418
1664
  /**
1419
1665
  * A request to list all symbols found in a given text document. The request's
@@ -1422,21 +1668,48 @@ export declare namespace DocumentHighlightRequest {
1422
1668
  * that resolves to such.
1423
1669
  */
1424
1670
  export declare namespace DocumentSymbolRequest {
1425
- const type: RequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, void, TextDocumentRegistrationOptions>;
1671
+ const type: RequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, void, DocumentSymbolRegistrationOptions>;
1672
+ const resultType: ProgressType<DocumentSymbol[] | SymbolInformation[]>;
1426
1673
  }
1427
1674
  /**
1428
- * A request to list project-wide symbols matching the query string given
1429
- * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
1430
- * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
1431
- * resolves to such.
1675
+ * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
1432
1676
  */
1433
- export declare namespace WorkspaceSymbolRequest {
1434
- const type: RequestType<WorkspaceSymbolParams, SymbolInformation[] | null, void, void>;
1677
+ export interface CodeActionClientCapabilities {
1678
+ /**
1679
+ * Whether code action supports dynamic registration.
1680
+ */
1681
+ dynamicRegistration?: boolean;
1682
+ /**
1683
+ * The client support code action literals as a valid
1684
+ * response of the `textDocument/codeAction` request.
1685
+ *
1686
+ * @since 3.8.0
1687
+ */
1688
+ codeActionLiteralSupport?: {
1689
+ /**
1690
+ * The code action kind is support with the following value
1691
+ * set.
1692
+ */
1693
+ codeActionKind: {
1694
+ /**
1695
+ * The code action kind values the client supports. When this
1696
+ * property exists the client also guarantees that it will
1697
+ * handle values outside its set gracefully and falls back
1698
+ * to a default value when unknown.
1699
+ */
1700
+ valueSet: CodeActionKind[];
1701
+ };
1702
+ };
1703
+ /**
1704
+ * Whether code action supports the `isPreferred` property.
1705
+ * @since 3.15.0
1706
+ */
1707
+ isPreferredSupport?: boolean;
1435
1708
  }
1436
1709
  /**
1437
- * Params for the CodeActionRequest
1710
+ * The parameters of a [CodeActionRequest](#CodeActionRequest).
1438
1711
  */
1439
- export interface CodeActionParams {
1712
+ export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams {
1440
1713
  /**
1441
1714
  * The document in which the command was invoked.
1442
1715
  */
@@ -1450,6 +1723,21 @@ export interface CodeActionParams {
1450
1723
  */
1451
1724
  context: CodeActionContext;
1452
1725
  }
1726
+ /**
1727
+ * Provider options for a [CodeActionRequest](#CodeActionRequest).
1728
+ */
1729
+ export interface CodeActionOptions extends WorkDoneProgressOptions {
1730
+ /**
1731
+ * CodeActionKinds that this server may return.
1732
+ *
1733
+ * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
1734
+ * may list out every specific kind they provide.
1735
+ */
1736
+ codeActionKinds?: CodeActionKind[];
1737
+ }
1738
+ /**
1739
+ * Registration options for a [CodeActionRequest](#CodeActionRequest).
1740
+ */
1453
1741
  export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions {
1454
1742
  }
1455
1743
  /**
@@ -1457,18 +1745,92 @@ export interface CodeActionRegistrationOptions extends TextDocumentRegistrationO
1457
1745
  */
1458
1746
  export declare namespace CodeActionRequest {
1459
1747
  const type: RequestType<CodeActionParams, (Command | CodeAction)[] | null, void, CodeActionRegistrationOptions>;
1748
+ const resultType: ProgressType<(Command | CodeAction)[]>;
1749
+ }
1750
+ /**
1751
+ * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1752
+ */
1753
+ export interface WorkspaceSymbolClientCapabilities {
1754
+ /**
1755
+ * Symbol request supports dynamic registration.
1756
+ */
1757
+ dynamicRegistration?: boolean;
1758
+ /**
1759
+ * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
1760
+ */
1761
+ symbolKind?: {
1762
+ /**
1763
+ * The symbol kind values the client supports. When this
1764
+ * property exists the client also guarantees that it will
1765
+ * handle values outside its set gracefully and falls back
1766
+ * to a default value when unknown.
1767
+ *
1768
+ * If this property is not present the client only supports
1769
+ * the symbol kinds from `File` to `Array` as defined in
1770
+ * the initial version of the protocol.
1771
+ */
1772
+ valueSet?: SymbolKind[];
1773
+ };
1774
+ }
1775
+ /**
1776
+ * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1777
+ */
1778
+ export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
1779
+ /**
1780
+ * A query string to filter symbols by. Clients may send an empty
1781
+ * string here to request all symbols.
1782
+ */
1783
+ query: string;
1784
+ }
1785
+ /**
1786
+ * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1787
+ */
1788
+ export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
1789
+ }
1790
+ /**
1791
+ * Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1792
+ */
1793
+ export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
1794
+ }
1795
+ /**
1796
+ * A request to list project-wide symbols matching the query string given
1797
+ * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
1798
+ * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
1799
+ * resolves to such.
1800
+ */
1801
+ export declare namespace WorkspaceSymbolRequest {
1802
+ const type: RequestType<WorkspaceSymbolParams, SymbolInformation[] | null, void, WorkspaceSymbolRegistrationOptions>;
1803
+ const resultType: ProgressType<SymbolInformation[]>;
1460
1804
  }
1461
1805
  /**
1462
- * Params for the Code Lens request.
1806
+ * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
1463
1807
  */
1464
- export interface CodeLensParams {
1808
+ export interface CodeLensClientCapabilities {
1809
+ /**
1810
+ * Whether code lens supports dynamic registration.
1811
+ */
1812
+ dynamicRegistration?: boolean;
1813
+ }
1814
+ /**
1815
+ * The parameters of a [CodeLensRequest](#CodeLensRequest).
1816
+ */
1817
+ export interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams {
1465
1818
  /**
1466
1819
  * The document to request code lens for.
1467
1820
  */
1468
1821
  textDocument: TextDocumentIdentifier;
1469
1822
  }
1470
1823
  /**
1471
- * Code Lens registration options.
1824
+ * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
1825
+ */
1826
+ export interface CodeLensOptions extends WorkDoneProgressOptions {
1827
+ /**
1828
+ * Code lens has a resolve provider as well.
1829
+ */
1830
+ resolveProvider?: boolean;
1831
+ }
1832
+ /**
1833
+ * Registration options for a [CodeLensRequest](#CodeLensRequest).
1472
1834
  */
1473
1835
  export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions {
1474
1836
  }
@@ -1477,6 +1839,7 @@ export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOpt
1477
1839
  */
1478
1840
  export declare namespace CodeLensRequest {
1479
1841
  const type: RequestType<CodeLensParams, CodeLens[] | null, void, CodeLensRegistrationOptions>;
1842
+ const resultType: ProgressType<CodeLens[]>;
1480
1843
  }
1481
1844
  /**
1482
1845
  * A request to resolve a command for a given code lens.
@@ -1484,7 +1847,72 @@ export declare namespace CodeLensRequest {
1484
1847
  export declare namespace CodeLensResolveRequest {
1485
1848
  const type: RequestType<CodeLens, CodeLens, void, void>;
1486
1849
  }
1487
- export interface DocumentFormattingParams {
1850
+ /**
1851
+ * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
1852
+ */
1853
+ export interface DocumentLinkClientCapabilities {
1854
+ /**
1855
+ * Whether document link supports dynamic registration.
1856
+ */
1857
+ dynamicRegistration?: boolean;
1858
+ /**
1859
+ * Whether the client support the `tooltip` property on `DocumentLink`.
1860
+ *
1861
+ * @since 3.15.0
1862
+ */
1863
+ tooltipSupport?: boolean;
1864
+ }
1865
+ /**
1866
+ * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
1867
+ */
1868
+ export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
1869
+ /**
1870
+ * The document to provide document links for.
1871
+ */
1872
+ textDocument: TextDocumentIdentifier;
1873
+ }
1874
+ /**
1875
+ * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
1876
+ */
1877
+ export interface DocumentLinkOptions extends WorkDoneProgressOptions {
1878
+ /**
1879
+ * Document links have a resolve provider as well.
1880
+ */
1881
+ resolveProvider?: boolean;
1882
+ }
1883
+ /**
1884
+ * Registration options for a [DocumentLinkRequest](#DocumentLinkRequest).
1885
+ */
1886
+ export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
1887
+ }
1888
+ /**
1889
+ * A request to provide document links
1890
+ */
1891
+ export declare namespace DocumentLinkRequest {
1892
+ const type: RequestType<DocumentLinkParams, DocumentLink[] | null, void, DocumentLinkRegistrationOptions>;
1893
+ const resultType: ProgressType<DocumentLink[]>;
1894
+ }
1895
+ /**
1896
+ * Request to resolve additional information for a given document link. The request's
1897
+ * parameter is of type [DocumentLink](#DocumentLink) the response
1898
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
1899
+ */
1900
+ export declare namespace DocumentLinkResolveRequest {
1901
+ const type: RequestType<DocumentLink, DocumentLink, void, void>;
1902
+ }
1903
+ /**
1904
+ * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1905
+ */
1906
+ export interface DocumentFormattingClientCapabilities {
1907
+ /**
1908
+ * Whether formatting supports dynamic registration.
1909
+ */
1910
+ dynamicRegistration?: boolean;
1911
+ }
1912
+ /**
1913
+ * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1914
+ */
1915
+ export interface DocumentFormattingParams extends WorkDoneProgressParams {
1488
1916
  /**
1489
1917
  * The document to format.
1490
1918
  */
@@ -1494,13 +1922,35 @@ export interface DocumentFormattingParams {
1494
1922
  */
1495
1923
  options: FormattingOptions;
1496
1924
  }
1925
+ /**
1926
+ * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1927
+ */
1928
+ export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
1929
+ }
1930
+ /**
1931
+ * Registration options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1932
+ */
1933
+ export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions {
1934
+ }
1497
1935
  /**
1498
1936
  * A request to to format a whole document.
1499
1937
  */
1500
1938
  export declare namespace DocumentFormattingRequest {
1501
- const type: RequestType<DocumentFormattingParams, TextEdit[] | null, void, TextDocumentRegistrationOptions>;
1939
+ const type: RequestType<DocumentFormattingParams, TextEdit[] | null, void, DocumentFormattingRegistrationOptions>;
1502
1940
  }
1503
- export interface DocumentRangeFormattingParams {
1941
+ /**
1942
+ * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1943
+ */
1944
+ export interface DocumentRangeFormattingClientCapabilities {
1945
+ /**
1946
+ * Whether range formatting supports dynamic registration.
1947
+ */
1948
+ dynamicRegistration?: boolean;
1949
+ }
1950
+ /**
1951
+ * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1952
+ */
1953
+ export interface DocumentRangeFormattingParams extends WorkDoneProgressParams {
1504
1954
  /**
1505
1955
  * The document to format.
1506
1956
  */
@@ -1514,12 +1964,34 @@ export interface DocumentRangeFormattingParams {
1514
1964
  */
1515
1965
  options: FormattingOptions;
1516
1966
  }
1967
+ /**
1968
+ * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1969
+ */
1970
+ export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
1971
+ }
1972
+ /**
1973
+ * Registration options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1974
+ */
1975
+ export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions {
1976
+ }
1517
1977
  /**
1518
1978
  * A request to to format a range in a document.
1519
1979
  */
1520
1980
  export declare namespace DocumentRangeFormattingRequest {
1521
- const type: RequestType<DocumentRangeFormattingParams, TextEdit[] | null, void, TextDocumentRegistrationOptions>;
1981
+ const type: RequestType<DocumentRangeFormattingParams, TextEdit[] | null, void, DocumentRangeFormattingRegistrationOptions>;
1522
1982
  }
1983
+ /**
1984
+ * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1985
+ */
1986
+ export interface DocumentOnTypeFormattingClientCapabilities {
1987
+ /**
1988
+ * Whether on type formatting supports dynamic registration.
1989
+ */
1990
+ dynamicRegistration?: boolean;
1991
+ }
1992
+ /**
1993
+ * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1994
+ */
1523
1995
  export interface DocumentOnTypeFormattingParams {
1524
1996
  /**
1525
1997
  * The document to format.
@@ -1539,7 +2011,20 @@ export interface DocumentOnTypeFormattingParams {
1539
2011
  options: FormattingOptions;
1540
2012
  }
1541
2013
  /**
1542
- * Format document on type options
2014
+ * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2015
+ */
2016
+ export interface DocumentOnTypeFormattingOptions {
2017
+ /**
2018
+ * A character on which formatting should be triggered, like `}`.
2019
+ */
2020
+ firstTriggerCharacter: string;
2021
+ /**
2022
+ * More trigger characters.
2023
+ */
2024
+ moreTriggerCharacter?: string[];
2025
+ }
2026
+ /**
2027
+ * Registration options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1543
2028
  */
1544
2029
  export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions {
1545
2030
  }
@@ -1549,7 +2034,23 @@ export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumen
1549
2034
  export declare namespace DocumentOnTypeFormattingRequest {
1550
2035
  const type: RequestType<DocumentOnTypeFormattingParams, TextEdit[] | null, void, DocumentOnTypeFormattingRegistrationOptions>;
1551
2036
  }
1552
- export interface RenameParams {
2037
+ export interface RenameClientCapabilities {
2038
+ /**
2039
+ * Whether rename supports dynamic registration.
2040
+ */
2041
+ dynamicRegistration?: boolean;
2042
+ /**
2043
+ * Client supports testing for validity of rename operations
2044
+ * before execution.
2045
+ *
2046
+ * @since version 3.12.0
2047
+ */
2048
+ prepareSupport?: boolean;
2049
+ }
2050
+ /**
2051
+ * The parameters of a [RenameRequest](#RenameRequest).
2052
+ */
2053
+ export interface RenameParams extends WorkDoneProgressParams {
1553
2054
  /**
1554
2055
  * The document to rename.
1555
2056
  */
@@ -1565,52 +2066,52 @@ export interface RenameParams {
1565
2066
  */
1566
2067
  newName: string;
1567
2068
  }
2069
+ /**
2070
+ * Provider options for a [RenameRequest](#RenameRequest).
2071
+ */
2072
+ export interface RenameOptions extends WorkDoneProgressOptions {
2073
+ /**
2074
+ * Renames should be checked and tested before being executed.
2075
+ *
2076
+ * @since version 3.12.0
2077
+ */
2078
+ prepareProvider?: boolean;
2079
+ }
2080
+ /**
2081
+ * Registration options for a [RenameRequest](#RenameRequest).
2082
+ */
2083
+ export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions {
2084
+ }
1568
2085
  /**
1569
2086
  * A request to rename a symbol.
1570
2087
  */
1571
2088
  export declare namespace RenameRequest {
1572
2089
  const type: RequestType<RenameParams, WorkspaceEdit | null, void, RenameRegistrationOptions>;
1573
2090
  }
2091
+ export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
2092
+ }
1574
2093
  /**
1575
2094
  * A request to test and perform the setup necessary for a rename.
1576
2095
  */
1577
2096
  export declare namespace PrepareRenameRequest {
1578
- const type: RequestType<TextDocumentPositionParams, Range | {
2097
+ const type: RequestType<PrepareRenameParams, Range | {
1579
2098
  range: Range;
1580
2099
  placeholder: string;
1581
2100
  } | null, void, void>;
1582
2101
  }
1583
2102
  /**
1584
- * Rename registration options.
2103
+ * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1585
2104
  */
1586
- export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions {
1587
- }
1588
- export interface DocumentLinkParams {
2105
+ export interface ExecuteCommandClientCapabilities {
1589
2106
  /**
1590
- * The document to provide document links for.
2107
+ * Execute command supports dynamic registration.
1591
2108
  */
1592
- textDocument: TextDocumentIdentifier;
2109
+ dynamicRegistration?: boolean;
1593
2110
  }
1594
2111
  /**
1595
- * Document link registration options
2112
+ * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1596
2113
  */
1597
- export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
1598
- }
1599
- /**
1600
- * A request to provide document links
1601
- */
1602
- export declare namespace DocumentLinkRequest {
1603
- const type: RequestType<DocumentLinkParams, DocumentLink[] | null, void, DocumentLinkRegistrationOptions>;
1604
- }
1605
- /**
1606
- * Request to resolve additional information for a given document link. The request's
1607
- * parameter is of type [DocumentLink](#DocumentLink) the response
1608
- * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
1609
- */
1610
- export declare namespace DocumentLinkResolveRequest {
1611
- const type: RequestType<DocumentLink, DocumentLink, void, void>;
1612
- }
1613
- export interface ExecuteCommandParams {
2114
+ export interface ExecuteCommandParams extends WorkDoneProgressParams {
1614
2115
  /**
1615
2116
  * The identifier of the actual command handler.
1616
2117
  */
@@ -1621,7 +2122,16 @@ export interface ExecuteCommandParams {
1621
2122
  arguments?: any[];
1622
2123
  }
1623
2124
  /**
1624
- * Execute command registration options.
2125
+ * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
2126
+ */
2127
+ export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
2128
+ /**
2129
+ * The commands to be executed on the server
2130
+ */
2131
+ commands: string[];
2132
+ }
2133
+ /**
2134
+ * Registration options for a [ExecuteCommandRequest](#ExecuteCommandRequest).
1625
2135
  */
1626
2136
  export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions {
1627
2137
  }
@@ -1632,6 +2142,26 @@ export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions
1632
2142
  export declare namespace ExecuteCommandRequest {
1633
2143
  const type: RequestType<ExecuteCommandParams, any, void, ExecuteCommandRegistrationOptions>;
1634
2144
  }
2145
+ export interface WorkspaceEditClientCapabilities {
2146
+ /**
2147
+ * The client supports versioned document changes in `WorkspaceEdit`s
2148
+ */
2149
+ documentChanges?: boolean;
2150
+ /**
2151
+ * The resource operations the client supports. Clients should at least
2152
+ * support 'create', 'rename' and 'delete' files and folders.
2153
+ *
2154
+ * @since 3.13.0
2155
+ */
2156
+ resourceOperations?: ResourceOperationKind[];
2157
+ /**
2158
+ * The failure handling strategy of a client if applying the workspace edit
2159
+ * fails.
2160
+ *
2161
+ * @since 3.13.0
2162
+ */
2163
+ failureHandling?: FailureHandlingKind;
2164
+ }
1635
2165
  /**
1636
2166
  * The parameters passed via a apply workspace edit request.
1637
2167
  */
@@ -1674,4 +2204,5 @@ export interface ApplyWorkspaceEditResponse {
1674
2204
  export declare namespace ApplyWorkspaceEditRequest {
1675
2205
  const type: RequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, void, void>;
1676
2206
  }
1677
- export { ImplementationRequest, TypeDefinitionRequest, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, ColorProviderOptions, DocumentColorParams, ColorPresentationParams, FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities, DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities, SelectionRangeClientCapabilities, SelectionRangeProviderOptions, SelectionRangeRequest, SelectionRangeServerCapabilities, SelectionRangeKind, SelectionRange };
2207
+ export { ImplementationRequest, TypeDefinitionRequest, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, DeclarationClientCapabilities, DeclarationRequest, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest };
2208
+ export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };