vscode-languageserver-protocol 3.15.0-next.8 → 3.15.2

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,15 @@
1
- import { RequestType, RequestType0, NotificationType, NotificationType0, ProgressToken, ProgressType } from 'vscode-jsonrpc';
2
- import { TextDocumentContentChangeEvent, Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, TextDocumentSaveReason, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, 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 { ProgressToken, ProgressType } 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, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag } from 'vscode-languageserver-types';
4
+ import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation';
5
+ import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition';
5
6
  import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders';
6
7
  import { ConfigurationRequest, ConfigurationParams, ConfigurationItem, ConfigurationClientCapabilities } from './protocol.configuration';
7
- import { DocumentColorRequest, ColorPresentationRequest, ColorOptions, DocumentColorParams, ColorPresentationParams, ColorServerCapabilities, ColorClientCapabilities } from './protocol.colorProvider';
8
- import { FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities } from './protocol.foldingRange';
9
- import { DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities } from './protocol.declaration';
10
- import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeServerCapabilities, SelectionRangeParams } from './protocol.selectionRange';
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';
11
13
  /**
12
14
  * A document filter denotes a document by different properties like
13
15
  * the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
@@ -92,7 +94,7 @@ export interface RegistrationParams {
92
94
  * handler on the client side.
93
95
  */
94
96
  export declare namespace RegistrationRequest {
95
- const type: RequestType<RegistrationParams, void, void, void>;
97
+ const type: ProtocolRequestType<RegistrationParams, void, never, void, void>;
96
98
  }
97
99
  /**
98
100
  * General parameters to unregister a request or notification.
@@ -116,7 +118,7 @@ export interface UnregistrationParams {
116
118
  * handler on the client side.
117
119
  */
118
120
  export declare namespace UnregistrationRequest {
119
- const type: RequestType<UnregistrationParams, void, void, void>;
121
+ const type: ProtocolRequestType<UnregistrationParams, void, never, void, void>;
120
122
  }
121
123
  export interface WorkDoneProgressParams {
122
124
  /**
@@ -183,7 +185,7 @@ export declare namespace FailureHandlingKind {
183
185
  const TextOnlyTransactional: FailureHandlingKind;
184
186
  /**
185
187
  * The client tries to undo the operations already executed. But there is no
186
- * guaruntee that this is succeeding.
188
+ * guarantee that this is succeeding.
187
189
  */
188
190
  const Undo: FailureHandlingKind;
189
191
  }
@@ -200,76 +202,23 @@ export interface WorkspaceClientCapabilities {
200
202
  /**
201
203
  * Capabilities specific to `WorkspaceEdit`s
202
204
  */
203
- workspaceEdit?: {
204
- /**
205
- * The client supports versioned document changes in `WorkspaceEdit`s
206
- */
207
- documentChanges?: boolean;
208
- /**
209
- * The resource operations the client supports. Clients should at least
210
- * support 'create', 'rename' and 'delete' files and folders.
211
- */
212
- resourceOperations?: ResourceOperationKind[];
213
- /**
214
- * The failure handling strategy of a client if applying the workspace edit
215
- * failes.
216
- */
217
- failureHandling?: FailureHandlingKind;
218
- };
205
+ workspaceEdit?: WorkspaceEditClientCapabilities;
219
206
  /**
220
207
  * Capabilities specific to the `workspace/didChangeConfiguration` notification.
221
208
  */
222
- didChangeConfiguration?: {
223
- /**
224
- * Did change configuration notification supports dynamic registration.
225
- */
226
- dynamicRegistration?: boolean;
227
- };
209
+ didChangeConfiguration?: DidChangeConfigurationClientCapabilities;
228
210
  /**
229
211
  * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
230
212
  */
231
- didChangeWatchedFiles?: {
232
- /**
233
- * Did change watched files notification supports dynamic registration. Please note
234
- * that the current protocol doesn't support static configuration for file changes
235
- * from the server side.
236
- */
237
- dynamicRegistration?: boolean;
238
- };
213
+ didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities;
239
214
  /**
240
215
  * Capabilities specific to the `workspace/symbol` request.
241
216
  */
242
- symbol?: {
243
- /**
244
- * Symbol request supports dynamic registration.
245
- */
246
- dynamicRegistration?: boolean;
247
- /**
248
- * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
249
- */
250
- symbolKind?: {
251
- /**
252
- * The symbol kind values the client supports. When this
253
- * property exists the client also guarantees that it will
254
- * handle values outside its set gracefully and falls back
255
- * to a default value when unknown.
256
- *
257
- * If this property is not present the client only supports
258
- * the symbol kinds from `File` to `Array` as defined in
259
- * the initial version of the protocol.
260
- */
261
- valueSet?: SymbolKind[];
262
- };
263
- };
217
+ symbol?: WorkspaceSymbolClientCapabilities;
264
218
  /**
265
219
  * Capabilities specific to the `workspace/executeCommand` request.
266
220
  */
267
- executeCommand?: {
268
- /**
269
- * Execute command supports dynamic registration.
270
- */
271
- dynamicRegistration?: boolean;
272
- };
221
+ executeCommand?: ExecuteCommandClientCapabilities;
273
222
  }
274
223
  /**
275
224
  * Text document specific client capabilities.
@@ -278,289 +227,101 @@ export interface TextDocumentClientCapabilities {
278
227
  /**
279
228
  * Defines which synchronization capabilities the client supports.
280
229
  */
281
- synchronization?: {
282
- /**
283
- * Whether text document synchronization supports dynamic registration.
284
- */
285
- dynamicRegistration?: boolean;
286
- /**
287
- * The client supports sending will save notifications.
288
- */
289
- willSave?: boolean;
290
- /**
291
- * The client supports sending a will save request and
292
- * waits for a response providing text edits which will
293
- * be applied to the document before it is saved.
294
- */
295
- willSaveWaitUntil?: boolean;
296
- /**
297
- * The client supports did save notifications.
298
- */
299
- didSave?: boolean;
300
- };
230
+ synchronization?: TextDocumentSyncClientCapabilities;
301
231
  /**
302
232
  * Capabilities specific to the `textDocument/completion`
303
233
  */
304
- completion?: {
305
- /**
306
- * Whether completion supports dynamic registration.
307
- */
308
- dynamicRegistration?: boolean;
309
- /**
310
- * The client supports the following `CompletionItem` specific
311
- * capabilities.
312
- */
313
- completionItem?: {
314
- /**
315
- * Client supports snippets as insert text.
316
- *
317
- * A snippet can define tab stops and placeholders with `$1`, `$2`
318
- * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
319
- * the end of the snippet. Placeholders with equal identifiers are linked,
320
- * that is typing in one will update others too.
321
- */
322
- snippetSupport?: boolean;
323
- /**
324
- * Client supports commit characters on a completion item.
325
- */
326
- commitCharactersSupport?: boolean;
327
- /**
328
- * Client supports the follow content formats for the documentation
329
- * property. The order describes the preferred format of the client.
330
- */
331
- documentationFormat?: MarkupKind[];
332
- /**
333
- * Client supports the deprecated property on a completion item.
334
- */
335
- deprecatedSupport?: boolean;
336
- /**
337
- * Client supports the preselect property on a completion item.
338
- */
339
- preselectSupport?: boolean;
340
- };
341
- completionItemKind?: {
342
- /**
343
- * The completion item kind values the client supports. When this
344
- * property exists the client also guarantees that it will
345
- * handle values outside its set gracefully and falls back
346
- * to a default value when unknown.
347
- *
348
- * If this property is not present the client only supports
349
- * the completion items kinds from `Text` to `Reference` as defined in
350
- * the initial version of the protocol.
351
- */
352
- valueSet?: CompletionItemKind[];
353
- };
354
- /**
355
- * The client supports to send additional context information for a
356
- * `textDocument/completion` requestion.
357
- */
358
- contextSupport?: boolean;
359
- };
234
+ completion?: CompletionClientCapabilities;
360
235
  /**
361
236
  * Capabilities specific to the `textDocument/hover`
362
237
  */
363
- hover?: {
364
- /**
365
- * Whether hover supports dynamic registration.
366
- */
367
- dynamicRegistration?: boolean;
368
- /**
369
- * Client supports the follow content formats for the content
370
- * property. The order describes the preferred format of the client.
371
- */
372
- contentFormat?: MarkupKind[];
373
- };
238
+ hover?: HoverClientCapabilities;
374
239
  /**
375
240
  * Capabilities specific to the `textDocument/signatureHelp`
376
241
  */
377
- signatureHelp?: {
378
- /**
379
- * Whether signature help supports dynamic registration.
380
- */
381
- dynamicRegistration?: boolean;
382
- /**
383
- * The client supports the following `SignatureInformation`
384
- * specific properties.
385
- */
386
- signatureInformation?: {
387
- /**
388
- * Client supports the follow content formats for the documentation
389
- * property. The order describes the preferred format of the client.
390
- */
391
- documentationFormat?: MarkupKind[];
392
- /**
393
- * Client capabilities specific to parameter information.
394
- */
395
- parameterInformation?: {
396
- /**
397
- * The client supports processing label offsets instead of a
398
- * simple label string.
399
- */
400
- labelOffsetSupport?: boolean;
401
- };
402
- };
403
- };
242
+ signatureHelp?: SignatureHelpClientCapabilities;
404
243
  /**
405
- * Capabilities specific to the `textDocument/references`
244
+ * Capabilities specific to the `textDocument/declaration`
245
+ *
246
+ * @since 3.14.0
406
247
  */
407
- references?: {
408
- /**
409
- * Whether references supports dynamic registration.
410
- */
411
- dynamicRegistration?: boolean;
412
- };
248
+ declaration?: DeclarationClientCapabilities;
413
249
  /**
414
- * Capabilities specific to the `textDocument/documentHighlight`
250
+ * Capabilities specific to the `textDocument/definition`
415
251
  */
416
- documentHighlight?: {
417
- /**
418
- * Whether document highlight supports dynamic registration.
419
- */
420
- dynamicRegistration?: boolean;
421
- };
252
+ definition?: DefinitionClientCapabilities;
422
253
  /**
423
- * Capabilities specific to the `textDocument/documentSymbol`
254
+ * Capabilities specific to the `textDocument/typeDefinition`
255
+ *
256
+ * @since 3.6.0
424
257
  */
425
- documentSymbol?: {
426
- /**
427
- * Whether document symbol supports dynamic registration.
428
- */
429
- dynamicRegistration?: boolean;
430
- /**
431
- * Specific capabilities for the `SymbolKind`.
432
- */
433
- symbolKind?: {
434
- /**
435
- * The symbol kind values the client supports. When this
436
- * property exists the client also guarantees that it will
437
- * handle values outside its set gracefully and falls back
438
- * to a default value when unknown.
439
- *
440
- * If this property is not present the client only supports
441
- * the symbol kinds from `File` to `Array` as defined in
442
- * the initial version of the protocol.
443
- */
444
- valueSet?: SymbolKind[];
445
- };
446
- /**
447
- * The client support hierarchical document symbols.
448
- */
449
- hierarchicalDocumentSymbolSupport?: boolean;
450
- };
258
+ typeDefinition?: TypeDefinitionClientCapabilities;
451
259
  /**
452
- * Capabilities specific to the `textDocument/formatting`
260
+ * Capabilities specific to the `textDocument/implementation`
261
+ *
262
+ * @since 3.6.0
453
263
  */
454
- formatting?: {
455
- /**
456
- * Whether formatting supports dynamic registration.
457
- */
458
- dynamicRegistration?: boolean;
459
- };
264
+ implementation?: ImplementationClientCapabilities;
460
265
  /**
461
- * Capabilities specific to the `textDocument/rangeFormatting`
266
+ * Capabilities specific to the `textDocument/references`
462
267
  */
463
- rangeFormatting?: {
464
- /**
465
- * Whether range formatting supports dynamic registration.
466
- */
467
- dynamicRegistration?: boolean;
468
- };
268
+ references?: ReferenceClientCapabilities;
469
269
  /**
470
- * Capabilities specific to the `textDocument/onTypeFormatting`
270
+ * Capabilities specific to the `textDocument/documentHighlight`
471
271
  */
472
- onTypeFormatting?: {
473
- /**
474
- * Whether on type formatting supports dynamic registration.
475
- */
476
- dynamicRegistration?: boolean;
477
- };
272
+ documentHighlight?: DocumentHighlightClientCapabilities;
478
273
  /**
479
- * Capabilities specific to the `textDocument/definition`
274
+ * Capabilities specific to the `textDocument/documentSymbol`
480
275
  */
481
- definition?: {
482
- /**
483
- * Whether definition supports dynamic registration.
484
- */
485
- dynamicRegistration?: boolean;
486
- /**
487
- * The client supports additional metadata in the form of definition links.
488
- */
489
- linkSupport?: boolean;
490
- };
276
+ documentSymbol?: DocumentSymbolClientCapabilities;
491
277
  /**
492
278
  * Capabilities specific to the `textDocument/codeAction`
493
279
  */
494
- codeAction?: {
495
- /**
496
- * Whether code action supports dynamic registration.
497
- */
498
- dynamicRegistration?: boolean;
499
- /**
500
- * The client support code action literals as a valid
501
- * response of the `textDocument/codeAction` request.
502
- */
503
- codeActionLiteralSupport?: {
504
- /**
505
- * The code action kind is support with the following value
506
- * set.
507
- */
508
- codeActionKind: {
509
- /**
510
- * The code action kind values the client supports. When this
511
- * property exists the client also guarantees that it will
512
- * handle values outside its set gracefully and falls back
513
- * to a default value when unknown.
514
- */
515
- valueSet: CodeActionKind[];
516
- };
517
- };
518
- };
280
+ codeAction?: CodeActionClientCapabilities;
519
281
  /**
520
282
  * Capabilities specific to the `textDocument/codeLens`
521
283
  */
522
- codeLens?: {
523
- /**
524
- * Whether code lens supports dynamic registration.
525
- */
526
- dynamicRegistration?: boolean;
527
- };
284
+ codeLens?: CodeLensClientCapabilities;
528
285
  /**
529
286
  * Capabilities specific to the `textDocument/documentLink`
530
287
  */
531
- documentLink?: {
532
- /**
533
- * Whether document link supports dynamic registration.
534
- */
535
- dynamicRegistration?: boolean;
536
- };
288
+ documentLink?: DocumentLinkClientCapabilities;
289
+ /**
290
+ * Capabilities specific to the `textDocument/documentColor`
291
+ */
292
+ colorProvider?: DocumentColorClientCapabilities;
293
+ /**
294
+ * Capabilities specific to the `textDocument/formatting`
295
+ */
296
+ formatting?: DocumentFormattingClientCapabilities;
297
+ /**
298
+ * Capabilities specific to the `textDocument/rangeFormatting`
299
+ */
300
+ rangeFormatting?: DocumentRangeFormattingClientCapabilities;
301
+ /**
302
+ * Capabilities specific to the `textDocument/onTypeFormatting`
303
+ */
304
+ onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities;
537
305
  /**
538
306
  * Capabilities specific to the `textDocument/rename`
539
307
  */
540
- rename?: {
541
- /**
542
- * Whether rename supports dynamic registration.
543
- */
544
- dynamicRegistration?: boolean;
545
- /**
546
- * Client supports testing for validity of rename operations
547
- * before execution.
548
- */
549
- prepareSupport?: boolean;
550
- };
308
+ rename?: RenameClientCapabilities;
309
+ /**
310
+ * Capabilities specific to `textDocument/foldingRange` requests.
311
+ *
312
+ * @since 3.10.0
313
+ */
314
+ foldingRange?: FoldingRangeClientCapabilities;
315
+ /**
316
+ * Capabilities specific to `textDocument/selectionRange` requests
317
+ *
318
+ * @since 3.15.0
319
+ */
320
+ selectionRange?: SelectionRangeClientCapabilities;
551
321
  /**
552
322
  * Capabilities specific to `textDocument/publishDiagnostics`.
553
323
  */
554
- publishDiagnostics?: {
555
- /**
556
- * Whether the clients accepts diagnostics with related information.
557
- */
558
- relatedInformation?: boolean;
559
- /**
560
- * Client supports the tag property to provide meta data about a diagnostic.
561
- */
562
- tagSupport?: boolean;
563
- };
324
+ publishDiagnostics?: PublishDiagnosticsClientCapabilities;
564
325
  }
565
326
  /**
566
327
  * Defines the capabilities provided by the client.
@@ -581,31 +342,9 @@ export interface _ClientCapabilities {
581
342
  /**
582
343
  * Experimental client capabilities.
583
344
  */
584
- experimental?: any;
585
- }
586
- export declare type ClientCapabilities = _ClientCapabilities & ImplementationClientCapabilities & TypeDefinitionClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & ColorClientCapabilities & FoldingRangeClientCapabilities & DeclarationClientCapabilities & SelectionRangeClientCapabilities;
587
- /**
588
- * Defines how the host (editor) should sync
589
- * document changes to the language server.
590
- */
591
- export declare namespace TextDocumentSyncKind {
592
- /**
593
- * Documents should not be synced at all.
594
- */
595
- const None = 0;
596
- /**
597
- * Documents are synced by always sending the full content
598
- * of the document.
599
- */
600
- const Full = 1;
601
- /**
602
- * Documents are synced by sending the full content on open.
603
- * After that only incremental updates to the document are
604
- * send.
605
- */
606
- const Incremental = 2;
345
+ experimental?: object;
607
346
  }
608
- export declare type TextDocumentSyncKind = 0 | 1 | 2;
347
+ export declare type ClientCapabilities = _ClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & WorkDoneProgressClientCapabilities;
609
348
  /**
610
349
  * Static registration options to be returned in the initialize
611
350
  * request.
@@ -643,144 +382,6 @@ export interface TextDocumentRegistrationOptions {
643
382
  export declare namespace TextDocumentRegistrationOptions {
644
383
  function is(value: any): value is TextDocumentRegistrationOptions;
645
384
  }
646
- /**
647
- * Completion options.
648
- */
649
- export interface CompletionOptions extends WorkDoneProgressOptions {
650
- /**
651
- * Most tools trigger completion request automatically without explicitly requesting
652
- * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
653
- * starts to type an identifier. For example if the user types `c` in a JavaScript file
654
- * code complete will automatically pop up present `console` besides others as a
655
- * completion item. Characters that make up identifiers don't need to be listed here.
656
- *
657
- * If code complete should automatically be trigger on characters not being valid inside
658
- * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
659
- */
660
- triggerCharacters?: string[];
661
- /**
662
- * The list of all possible characters that commit a completion. This field can be used
663
- * if clients don't support individual commmit characters per completion item. See
664
- * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
665
- */
666
- allCommitCharacters?: string[];
667
- /**
668
- * The server provides support to resolve additional
669
- * information for a completion item.
670
- */
671
- resolveProvider?: boolean;
672
- }
673
- /**
674
- * Hover options.
675
- */
676
- export interface HoverOptions extends WorkDoneProgressOptions {
677
- }
678
- /**
679
- * Signature help options.
680
- */
681
- export interface SignatureHelpOptions extends WorkDoneProgressOptions {
682
- /**
683
- * The characters that trigger signature help
684
- * automatically.
685
- */
686
- triggerCharacters?: string[];
687
- }
688
- /**
689
- * Definition options.
690
- */
691
- export interface DefinitionOptions extends WorkDoneProgressOptions {
692
- }
693
- /**
694
- * Reference options.
695
- */
696
- export interface ReferenceOptions extends WorkDoneProgressOptions {
697
- }
698
- /**
699
- * Document highlight options.
700
- */
701
- export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
702
- }
703
- /**
704
- * Document symbol options.
705
- */
706
- export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
707
- }
708
- /**
709
- * Workspace symbol options.
710
- */
711
- export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
712
- }
713
- /**
714
- * Code Action options.
715
- */
716
- export interface CodeActionOptions extends WorkDoneProgressOptions {
717
- /**
718
- * CodeActionKinds that this server may return.
719
- *
720
- * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
721
- * may list out every specific kind they provide.
722
- */
723
- codeActionKinds?: CodeActionKind[];
724
- }
725
- /**
726
- * Code Lens options.
727
- */
728
- export interface CodeLensOptions extends WorkDoneProgressOptions {
729
- /**
730
- * Code lens has a resolve provider as well.
731
- */
732
- resolveProvider?: boolean;
733
- }
734
- /**
735
- * Document formatting options.
736
- */
737
- export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
738
- }
739
- /**
740
- * Document range formatting options.
741
- */
742
- export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
743
- }
744
- /**
745
- * Format document on type options
746
- */
747
- export interface DocumentOnTypeFormattingOptions {
748
- /**
749
- * A character on which formatting should be triggered, like `}`.
750
- */
751
- firstTriggerCharacter: string;
752
- /**
753
- * More trigger characters.
754
- */
755
- moreTriggerCharacter?: string[];
756
- }
757
- /**
758
- * Rename options
759
- */
760
- export interface RenameOptions extends WorkDoneProgressOptions {
761
- /**
762
- * Renames should be checked and tested before being executed.
763
- */
764
- prepareProvider?: boolean;
765
- }
766
- /**
767
- * Document link options
768
- */
769
- export interface DocumentLinkOptions extends WorkDoneProgressOptions {
770
- /**
771
- * Document links have a resolve provider as well.
772
- */
773
- resolveProvider?: boolean;
774
- }
775
- /**
776
- * Execute command options.
777
- */
778
- export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
779
- /**
780
- * The commands to be executed on the server
781
- */
782
- commands: string[];
783
- }
784
385
  /**
785
386
  * Save options.
786
387
  */
@@ -790,33 +391,6 @@ export interface SaveOptions {
790
391
  */
791
392
  includeText?: boolean;
792
393
  }
793
- export interface TextDocumentSyncOptions {
794
- /**
795
- * Open and close notifications are sent to the server. If omitted open close notification should not
796
- * be sent.
797
- */
798
- openClose?: boolean;
799
- /**
800
- * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
801
- * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
802
- */
803
- change?: TextDocumentSyncKind;
804
- /**
805
- * If present will save notifications are sent to the server. If omitted the notification should not be
806
- * sent.
807
- */
808
- willSave?: boolean;
809
- /**
810
- * If present will save wait until requests are sent to the server. If omitted the request should not be
811
- * sent.
812
- */
813
- willSaveWaitUntil?: boolean;
814
- /**
815
- * If present save notifications are sent to the server. If omitted the notification should not be
816
- * sent.
817
- */
818
- save?: SaveOptions;
819
- }
820
394
  export interface WorkDoneProgressOptions {
821
395
  workDoneProgress?: boolean;
822
396
  }
@@ -840,22 +414,34 @@ export interface _ServerCapabilities<T = any> {
840
414
  * for backwards compatibility the TextDocumentSyncKind number.
841
415
  */
842
416
  textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
843
- /**
844
- * The server provides hover support.
845
- */
846
- hoverProvider?: boolean | HoverOptions;
847
417
  /**
848
418
  * The server provides completion support.
849
419
  */
850
420
  completionProvider?: CompletionOptions;
421
+ /**
422
+ * The server provides hover support.
423
+ */
424
+ hoverProvider?: boolean | HoverOptions;
851
425
  /**
852
426
  * The server provides signature help support.
853
427
  */
854
428
  signatureHelpProvider?: SignatureHelpOptions;
429
+ /**
430
+ * The server provides Goto Declaration support.
431
+ */
432
+ declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions;
855
433
  /**
856
434
  * The server provides goto definition support.
857
435
  */
858
436
  definitionProvider?: boolean | DefinitionOptions;
437
+ /**
438
+ * The server provides Goto Type Definition support.
439
+ */
440
+ typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions;
441
+ /**
442
+ * The server provides Goto Implementation support.
443
+ */
444
+ implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions;
859
445
  /**
860
446
  * The server provides find references support.
861
447
  */
@@ -868,10 +454,6 @@ export interface _ServerCapabilities<T = any> {
868
454
  * The server provides document symbol support.
869
455
  */
870
456
  documentSymbolProvider?: boolean | DocumentSymbolOptions;
871
- /**
872
- * The server provides workspace symbol support.
873
- */
874
- workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions;
875
457
  /**
876
458
  * The server provides code actions. CodeActionOptions may only be
877
459
  * specified if the client states that it supports
@@ -882,6 +464,18 @@ export interface _ServerCapabilities<T = any> {
882
464
  * The server provides code lens.
883
465
  */
884
466
  codeLensProvider?: CodeLensOptions;
467
+ /**
468
+ * The server provides document link support.
469
+ */
470
+ documentLinkProvider?: DocumentLinkOptions;
471
+ /**
472
+ * The server provides color provider support.
473
+ */
474
+ colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;
475
+ /**
476
+ * The server provides workspace symbol support.
477
+ */
478
+ workspaceSymbolProvider?: boolean | WorkspaceSymbolOptions;
885
479
  /**
886
480
  * The server provides document formatting.
887
481
  */
@@ -901,9 +495,13 @@ export interface _ServerCapabilities<T = any> {
901
495
  */
902
496
  renameProvider?: boolean | RenameOptions;
903
497
  /**
904
- * The server provides document link support.
498
+ * The server provides folding provider support.
905
499
  */
906
- documentLinkProvider?: DocumentLinkOptions;
500
+ foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions;
501
+ /**
502
+ * The server provides selection range support.
503
+ */
504
+ selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions;
907
505
  /**
908
506
  * The server provides execute command support.
909
507
  */
@@ -913,7 +511,7 @@ export interface _ServerCapabilities<T = any> {
913
511
  */
914
512
  experimental?: T;
915
513
  }
916
- export declare type ServerCapabilities<T = any> = _ServerCapabilities<T> & ImplementationServerCapabilities & TypeDefinitionServerCapabilities & WorkspaceFoldersServerCapabilities & ColorServerCapabilities & FoldingRangeServerCapabilities & DeclarationServerCapabilities & SelectionRangeServerCapabilities;
514
+ export declare type ServerCapabilities<T = any> = _ServerCapabilities<T> & WorkspaceFoldersServerCapabilities;
917
515
  /**
918
516
  * The initialize request is sent from the client to the server.
919
517
  * It is sent once as the request after starting up the server.
@@ -922,7 +520,7 @@ export declare type ServerCapabilities<T = any> = _ServerCapabilities<T> & Imple
922
520
  * resolves to such.
923
521
  */
924
522
  export declare namespace InitializeRequest {
925
- const type: RequestType<_InitializeParams & WorkspaceFoldersInitializeParams & WorkDoneProgressParams, InitializeResult<any>, InitializeError, void>;
523
+ const type: ProtocolRequestType<_InitializeParams & WorkspaceFoldersInitializeParams & WorkDoneProgressParams, InitializeResult<any>, never, InitializeError, void>;
926
524
  }
927
525
  /**
928
526
  * The initialize parameters
@@ -933,6 +531,21 @@ export interface _InitializeParams extends WorkDoneProgressParams {
933
531
  * the server.
934
532
  */
935
533
  processId: number | null;
534
+ /**
535
+ * Information about the client
536
+ *
537
+ * @since 3.15.0
538
+ */
539
+ clientInfo?: {
540
+ /**
541
+ * The name of the client as defined by the client.
542
+ */
543
+ name: string;
544
+ /**
545
+ * The client's version as defined by the client.
546
+ */
547
+ version?: string;
548
+ };
936
549
  /**
937
550
  * The rootPath of the workspace. Is null
938
551
  * if no folder is open.
@@ -970,6 +583,21 @@ export interface InitializeResult<T = any> {
970
583
  * The capabilities the language server provides.
971
584
  */
972
585
  capabilities: ServerCapabilities<T>;
586
+ /**
587
+ * Information about the server.
588
+ *
589
+ * @since 3.15.0
590
+ */
591
+ serverInfo?: {
592
+ /**
593
+ * The name of the server as defined by the server.
594
+ */
595
+ name: string;
596
+ /**
597
+ * The servers's version as defined by the server.
598
+ */
599
+ version?: string;
600
+ };
973
601
  /**
974
602
  * Custom initialization results.
975
603
  */
@@ -1007,7 +635,7 @@ export interface InitializedParams {
1007
635
  * is allowed to send requests from the server to the client.
1008
636
  */
1009
637
  export declare namespace InitializedNotification {
1010
- const type: NotificationType<InitializedParams, void>;
638
+ const type: ProtocolNotificationType<InitializedParams, void>;
1011
639
  }
1012
640
  /**
1013
641
  * A shutdown request is sent from the client to the server.
@@ -1016,14 +644,20 @@ export declare namespace InitializedNotification {
1016
644
  * is the exit event.
1017
645
  */
1018
646
  export declare namespace ShutdownRequest {
1019
- const type: RequestType0<void, void, void>;
647
+ const type: ProtocolRequestType0<void, never, void, void>;
1020
648
  }
1021
649
  /**
1022
650
  * The exit event is sent from the client to the server to
1023
651
  * ask the server to exit its process.
1024
652
  */
1025
653
  export declare namespace ExitNotification {
1026
- const type: NotificationType0<void>;
654
+ const type: ProtocolNotificationType0<void>;
655
+ }
656
+ export interface DidChangeConfigurationClientCapabilities {
657
+ /**
658
+ * Did change configuration notification supports dynamic registration.
659
+ */
660
+ dynamicRegistration?: boolean;
1027
661
  }
1028
662
  /**
1029
663
  * The configuration change notification is sent from the client to the server
@@ -1031,7 +665,7 @@ export declare namespace ExitNotification {
1031
665
  * the changed configuration as defined by the language client.
1032
666
  */
1033
667
  export declare namespace DidChangeConfigurationNotification {
1034
- const type: NotificationType<DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions>;
668
+ const type: ProtocolNotificationType<DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions>;
1035
669
  }
1036
670
  export interface DidChangeConfigurationRegistrationOptions {
1037
671
  section?: string | string[];
@@ -1085,7 +719,7 @@ export interface ShowMessageParams {
1085
719
  * the client to display a particular message in the user interface.
1086
720
  */
1087
721
  export declare namespace ShowMessageNotification {
1088
- const type: NotificationType<ShowMessageParams, void>;
722
+ const type: ProtocolNotificationType<ShowMessageParams, void>;
1089
723
  }
1090
724
  export interface MessageActionItem {
1091
725
  /**
@@ -1112,14 +746,14 @@ export interface ShowMessageRequestParams {
1112
746
  * and a set of options actions to the user.
1113
747
  */
1114
748
  export declare namespace ShowMessageRequest {
1115
- const type: RequestType<ShowMessageRequestParams, MessageActionItem | null, void, void>;
749
+ const type: ProtocolRequestType<ShowMessageRequestParams, MessageActionItem | null, never, void, void>;
1116
750
  }
1117
751
  /**
1118
752
  * The log message notification is sent from the server to the client to ask
1119
753
  * the client to log a particular message.
1120
754
  */
1121
755
  export declare namespace LogMessageNotification {
1122
- const type: NotificationType<LogMessageParams, void>;
756
+ const type: ProtocolNotificationType<LogMessageParams, void>;
1123
757
  }
1124
758
  /**
1125
759
  * The log message parameters.
@@ -1139,7 +773,76 @@ export interface LogMessageParams {
1139
773
  * the client to log telemetry data.
1140
774
  */
1141
775
  export declare namespace TelemetryEventNotification {
1142
- const type: NotificationType<any, void>;
776
+ const type: ProtocolNotificationType<any, void>;
777
+ }
778
+ export interface TextDocumentSyncClientCapabilities {
779
+ /**
780
+ * Whether text document synchronization supports dynamic registration.
781
+ */
782
+ dynamicRegistration?: boolean;
783
+ /**
784
+ * The client supports sending will save notifications.
785
+ */
786
+ willSave?: boolean;
787
+ /**
788
+ * The client supports sending a will save request and
789
+ * waits for a response providing text edits which will
790
+ * be applied to the document before it is saved.
791
+ */
792
+ willSaveWaitUntil?: boolean;
793
+ /**
794
+ * The client supports did save notifications.
795
+ */
796
+ didSave?: boolean;
797
+ }
798
+ /**
799
+ * Defines how the host (editor) should sync
800
+ * document changes to the language server.
801
+ */
802
+ export declare namespace TextDocumentSyncKind {
803
+ /**
804
+ * Documents should not be synced at all.
805
+ */
806
+ const None = 0;
807
+ /**
808
+ * Documents are synced by always sending the full content
809
+ * of the document.
810
+ */
811
+ const Full = 1;
812
+ /**
813
+ * Documents are synced by sending the full content on open.
814
+ * After that only incremental updates to the document are
815
+ * send.
816
+ */
817
+ const Incremental = 2;
818
+ }
819
+ export declare type TextDocumentSyncKind = 0 | 1 | 2;
820
+ export interface TextDocumentSyncOptions {
821
+ /**
822
+ * Open and close notifications are sent to the server. If omitted open close notification should not
823
+ * be sent.
824
+ */
825
+ openClose?: boolean;
826
+ /**
827
+ * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
828
+ * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
829
+ */
830
+ change?: TextDocumentSyncKind;
831
+ /**
832
+ * If present will save notifications are sent to the server. If omitted the notification should not be
833
+ * sent.
834
+ */
835
+ willSave?: boolean;
836
+ /**
837
+ * If present will save wait until requests are sent to the server. If omitted the request should not be
838
+ * sent.
839
+ */
840
+ willSaveWaitUntil?: boolean;
841
+ /**
842
+ * If present save notifications are sent to the server. If omitted the notification should not be
843
+ * sent.
844
+ */
845
+ save?: SaveOptions;
1143
846
  }
1144
847
  /**
1145
848
  * The parameters send in a open text document notification
@@ -1161,8 +864,34 @@ export interface DidOpenTextDocumentParams {
1161
864
  * is one.
1162
865
  */
1163
866
  export declare namespace DidOpenTextDocumentNotification {
1164
- const type: NotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
867
+ const method: 'textDocument/didOpen';
868
+ const type: ProtocolNotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
1165
869
  }
870
+ /**
871
+ * An event describing a change to a text document. If range and rangeLength are omitted
872
+ * the new text is considered to be the full content of the document.
873
+ */
874
+ export declare type TextDocumentContentChangeEvent = {
875
+ /**
876
+ * The range of the document that changed.
877
+ */
878
+ range: Range;
879
+ /**
880
+ * The optional length of the range that got replaced.
881
+ *
882
+ * @deprecated use range instead.
883
+ */
884
+ rangeLength?: number;
885
+ /**
886
+ * The new text for the provided range.
887
+ */
888
+ text: string;
889
+ } | {
890
+ /**
891
+ * The new text of the whole document.
892
+ */
893
+ text: string;
894
+ };
1166
895
  /**
1167
896
  * The change text document notification's parameters.
1168
897
  */
@@ -1175,8 +904,16 @@ export interface DidChangeTextDocumentParams {
1175
904
  textDocument: VersionedTextDocumentIdentifier;
1176
905
  /**
1177
906
  * The actual content changes. The content changes describe single state changes
1178
- * to the document. So if there are two content changes c1 and c2 for a document
1179
- * in state S then c1 move the document to S' and c2 to S''.
907
+ * to the document. So if there are two content changes c1 (at array index 0) and
908
+ * c2 (at array index 1) for a document in state S then c1 moves the document from
909
+ * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
910
+ * on the state S'.
911
+ *
912
+ * To mirror the content of a document using change events use the following approach:
913
+ * - start with the same initial content
914
+ * - apply the 'textDocument/didChange' notifications in the order you recevie them.
915
+ * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
916
+ * you receive them.
1180
917
  */
1181
918
  contentChanges: TextDocumentContentChangeEvent[];
1182
919
  }
@@ -1194,7 +931,8 @@ export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegis
1194
931
  * changes to a text document.
1195
932
  */
1196
933
  export declare namespace DidChangeTextDocumentNotification {
1197
- const type: NotificationType<DidChangeTextDocumentParams, TextDocumentChangeRegistrationOptions>;
934
+ const method: 'textDocument/didChange';
935
+ const type: ProtocolNotificationType<DidChangeTextDocumentParams, TextDocumentChangeRegistrationOptions>;
1198
936
  }
1199
937
  /**
1200
938
  * The parameters send in a close text document notification
@@ -1215,7 +953,8 @@ export interface DidCloseTextDocumentParams {
1215
953
  * notification requires a previous open notification to be sent.
1216
954
  */
1217
955
  export declare namespace DidCloseTextDocumentNotification {
1218
- const type: NotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>;
956
+ const method: 'textDocument/didClose';
957
+ const type: ProtocolNotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>;
1219
958
  }
1220
959
  /**
1221
960
  * The parameters send in a save text document notification
@@ -1241,8 +980,28 @@ export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistr
1241
980
  * the document got saved in the client.
1242
981
  */
1243
982
  export declare namespace DidSaveTextDocumentNotification {
1244
- const type: NotificationType<DidSaveTextDocumentParams, TextDocumentSaveRegistrationOptions>;
983
+ const method: 'textDocument/didSave';
984
+ const type: ProtocolNotificationType<DidSaveTextDocumentParams, TextDocumentSaveRegistrationOptions>;
985
+ }
986
+ /**
987
+ * Represents reasons why a text document is saved.
988
+ */
989
+ export declare namespace TextDocumentSaveReason {
990
+ /**
991
+ * Manually triggered, e.g. by the user pressing save, by starting debugging,
992
+ * or by an API call.
993
+ */
994
+ const Manual: 1;
995
+ /**
996
+ * Automatic after a delay.
997
+ */
998
+ const AfterDelay: 2;
999
+ /**
1000
+ * When the editor lost focus.
1001
+ */
1002
+ const FocusOut: 3;
1245
1003
  }
1004
+ export declare type TextDocumentSaveReason = 1 | 2 | 3;
1246
1005
  /**
1247
1006
  * The parameters send in a will save text document notification.
1248
1007
  */
@@ -1261,7 +1020,8 @@ export interface WillSaveTextDocumentParams {
1261
1020
  * the document is actually saved.
1262
1021
  */
1263
1022
  export declare namespace WillSaveTextDocumentNotification {
1264
- const type: NotificationType<WillSaveTextDocumentParams, TextDocumentRegistrationOptions>;
1023
+ const method: 'textDocument/willSave';
1024
+ const type: ProtocolNotificationType<WillSaveTextDocumentParams, TextDocumentRegistrationOptions>;
1265
1025
  }
1266
1026
  /**
1267
1027
  * A document will save request is sent from the client to the server before
@@ -1272,14 +1032,23 @@ export declare namespace WillSaveTextDocumentNotification {
1272
1032
  * reliable.
1273
1033
  */
1274
1034
  export declare namespace WillSaveTextDocumentWaitUntilRequest {
1275
- const type: RequestType<WillSaveTextDocumentParams, TextEdit[] | null, void, TextDocumentRegistrationOptions>;
1035
+ const method: 'textDocument/willSaveWaitUntil';
1036
+ const type: ProtocolRequestType<WillSaveTextDocumentParams, TextEdit[] | null, never, void, TextDocumentRegistrationOptions>;
1037
+ }
1038
+ export interface DidChangeWatchedFilesClientCapabilities {
1039
+ /**
1040
+ * Did change watched files notification supports dynamic registration. Please note
1041
+ * that the current protocol doesn't support static configuration for file changes
1042
+ * from the server side.
1043
+ */
1044
+ dynamicRegistration?: boolean;
1276
1045
  }
1277
1046
  /**
1278
1047
  * The watched files notification is sent from the client to the server when
1279
1048
  * the client detects changes to file watched by the language client.
1280
1049
  */
1281
1050
  export declare namespace DidChangeWatchedFilesNotification {
1282
- const type: NotificationType<DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions>;
1051
+ const type: ProtocolNotificationType<DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions>;
1283
1052
  }
1284
1053
  /**
1285
1054
  * The watched files change notification's parameters.
@@ -1363,11 +1132,32 @@ export declare namespace WatchKind {
1363
1132
  const Delete = 4;
1364
1133
  }
1365
1134
  /**
1366
- * Diagnostics notification are sent from the server to the client to signal
1367
- * results of validation runs.
1135
+ * The publish diagnostic client capabilities.
1368
1136
  */
1369
- export declare namespace PublishDiagnosticsNotification {
1370
- const type: NotificationType<PublishDiagnosticsParams, void>;
1137
+ export interface PublishDiagnosticsClientCapabilities {
1138
+ /**
1139
+ * Whether the clients accepts diagnostics with related information.
1140
+ */
1141
+ relatedInformation?: boolean;
1142
+ /**
1143
+ * Client supports the tag property to provide meta data about a diagnostic.
1144
+ * Clients supporting tags have to handle unknown tags gracefully.
1145
+ *
1146
+ * @since 3.15.0
1147
+ */
1148
+ tagSupport?: {
1149
+ /**
1150
+ * The tags supported by the client.
1151
+ */
1152
+ valueSet: DiagnosticTag[];
1153
+ };
1154
+ /**
1155
+ * Whether the client interprets the version property of the
1156
+ * `textDocument/publishDiagnostics` notification`s parameter.
1157
+ *
1158
+ * @since 3.15.0
1159
+ */
1160
+ versionSupport?: boolean;
1371
1161
  }
1372
1162
  /**
1373
1163
  * The publish diagnostic notification's parameters.
@@ -1380,7 +1170,7 @@ export interface PublishDiagnosticsParams {
1380
1170
  /**
1381
1171
  * Optional the version number of the document the diagnostics are published for.
1382
1172
  *
1383
- * @since 3.15
1173
+ * @since 3.15.0
1384
1174
  */
1385
1175
  version?: number;
1386
1176
  /**
@@ -1388,6 +1178,86 @@ export interface PublishDiagnosticsParams {
1388
1178
  */
1389
1179
  diagnostics: Diagnostic[];
1390
1180
  }
1181
+ /**
1182
+ * Diagnostics notification are sent from the server to the client to signal
1183
+ * results of validation runs.
1184
+ */
1185
+ export declare namespace PublishDiagnosticsNotification {
1186
+ const type: ProtocolNotificationType<PublishDiagnosticsParams, void>;
1187
+ }
1188
+ /**
1189
+ * Completion client capabilities
1190
+ */
1191
+ export interface CompletionClientCapabilities {
1192
+ /**
1193
+ * Whether completion supports dynamic registration.
1194
+ */
1195
+ dynamicRegistration?: boolean;
1196
+ /**
1197
+ * The client supports the following `CompletionItem` specific
1198
+ * capabilities.
1199
+ */
1200
+ completionItem?: {
1201
+ /**
1202
+ * Client supports snippets as insert text.
1203
+ *
1204
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
1205
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1206
+ * the end of the snippet. Placeholders with equal identifiers are linked,
1207
+ * that is typing in one will update others too.
1208
+ */
1209
+ snippetSupport?: boolean;
1210
+ /**
1211
+ * Client supports commit characters on a completion item.
1212
+ */
1213
+ commitCharactersSupport?: boolean;
1214
+ /**
1215
+ * Client supports the follow content formats for the documentation
1216
+ * property. The order describes the preferred format of the client.
1217
+ */
1218
+ documentationFormat?: MarkupKind[];
1219
+ /**
1220
+ * Client supports the deprecated property on a completion item.
1221
+ */
1222
+ deprecatedSupport?: boolean;
1223
+ /**
1224
+ * Client supports the preselect property on a completion item.
1225
+ */
1226
+ preselectSupport?: boolean;
1227
+ /**
1228
+ * Client supports the tag property on a completion item. Clients supporting
1229
+ * tags have to handle unknown tags gracefully. Clients especially need to
1230
+ * preserve unknown tags when sending a completion item back to the server in
1231
+ * a resolve call.
1232
+ *
1233
+ * @since 3.15.0
1234
+ */
1235
+ tagSupport?: {
1236
+ /**
1237
+ * The tags supported by the client.
1238
+ */
1239
+ valueSet: CompletionItemTag[];
1240
+ };
1241
+ };
1242
+ completionItemKind?: {
1243
+ /**
1244
+ * The completion item kind values the client supports. When this
1245
+ * property exists the client also guarantees that it will
1246
+ * handle values outside its set gracefully and falls back
1247
+ * to a default value when unknown.
1248
+ *
1249
+ * If this property is not present the client only supports
1250
+ * the completion items kinds from `Text` to `Reference` as defined in
1251
+ * the initial version of the protocol.
1252
+ */
1253
+ valueSet?: CompletionItemKind[];
1254
+ };
1255
+ /**
1256
+ * The client supports to send additional context information for a
1257
+ * `textDocument/completion` requestion.
1258
+ */
1259
+ contextSupport?: boolean;
1260
+ }
1391
1261
  /**
1392
1262
  * How a completion was triggered
1393
1263
  */
@@ -1428,10 +1298,42 @@ export interface CompletionContext {
1428
1298
  export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1429
1299
  /**
1430
1300
  * The completion context. This is only available it the client specifies
1431
- * to send this using `ClientCapabilities.textDocument.completion.contextSupport === true`
1301
+ * to send this using the client capability `textDocument.completion.contextSupport === true`
1432
1302
  */
1433
1303
  context?: CompletionContext;
1434
1304
  }
1305
+ /**
1306
+ * Completion options.
1307
+ */
1308
+ export interface CompletionOptions extends WorkDoneProgressOptions {
1309
+ /**
1310
+ * Most tools trigger completion request automatically without explicitly requesting
1311
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
1312
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
1313
+ * code complete will automatically pop up present `console` besides others as a
1314
+ * completion item. Characters that make up identifiers don't need to be listed here.
1315
+ *
1316
+ * If code complete should automatically be trigger on characters not being valid inside
1317
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
1318
+ */
1319
+ triggerCharacters?: string[];
1320
+ /**
1321
+ * The list of all possible characters that commit a completion. This field can be used
1322
+ * if clients don't support individual commmit characters per completion item. See
1323
+ * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
1324
+ *
1325
+ * If a server provides both `allCommitCharacters` and commit characters on an individual
1326
+ * completion item the ones on the completion item win.
1327
+ *
1328
+ * @since 3.2.0
1329
+ */
1330
+ allCommitCharacters?: string[];
1331
+ /**
1332
+ * The server provides support to resolve additional
1333
+ * information for a completion item.
1334
+ */
1335
+ resolveProvider?: boolean;
1336
+ }
1435
1337
  /**
1436
1338
  * Registration options for a [CompletionRequest](#CompletionRequest).
1437
1339
  */
@@ -1449,7 +1351,9 @@ export interface CompletionRegistrationOptions extends TextDocumentRegistrationO
1449
1351
  * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
1450
1352
  */
1451
1353
  export declare namespace CompletionRequest {
1452
- const type: RequestType<CompletionParams, CompletionList | CompletionItem[] | null, void, CompletionRegistrationOptions>;
1354
+ const method: 'textDocument/completion';
1355
+ const type: ProtocolRequestType<CompletionParams, CompletionList | CompletionItem[] | null, CompletionItem[], void, CompletionRegistrationOptions>;
1356
+ /** @deprecated Use CompletionRequest.type */
1453
1357
  const resultType: ProgressType<CompletionItem[]>;
1454
1358
  }
1455
1359
  /**
@@ -1458,7 +1362,24 @@ export declare namespace CompletionRequest {
1458
1362
  * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
1459
1363
  */
1460
1364
  export declare namespace CompletionResolveRequest {
1461
- const type: RequestType<CompletionItem, CompletionItem, void, void>;
1365
+ const method: 'completionItem/resolve';
1366
+ const type: ProtocolRequestType<CompletionItem, CompletionItem, never, void, void>;
1367
+ }
1368
+ export interface HoverClientCapabilities {
1369
+ /**
1370
+ * Whether hover supports dynamic registration.
1371
+ */
1372
+ dynamicRegistration?: boolean;
1373
+ /**
1374
+ * Client supports the follow content formats for the content
1375
+ * property. The order describes the preferred format of the client.
1376
+ */
1377
+ contentFormat?: MarkupKind[];
1378
+ }
1379
+ /**
1380
+ * Hover options.
1381
+ */
1382
+ export interface HoverOptions extends WorkDoneProgressOptions {
1462
1383
  }
1463
1384
  /**
1464
1385
  * Parameters for a [HoverRequest](#HoverRequest).
@@ -1476,12 +1397,130 @@ export interface HoverRegistrationOptions extends TextDocumentRegistrationOption
1476
1397
  * type [Hover](#Hover) or a Thenable that resolves to such.
1477
1398
  */
1478
1399
  export declare namespace HoverRequest {
1479
- const type: RequestType<HoverParams, Hover | null, void, HoverRegistrationOptions>;
1400
+ const method: 'textDocument/hover';
1401
+ const type: ProtocolRequestType<HoverParams, Hover | null, never, void, HoverRegistrationOptions>;
1402
+ }
1403
+ /**
1404
+ * Client Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1405
+ */
1406
+ export interface SignatureHelpClientCapabilities {
1407
+ /**
1408
+ * Whether signature help supports dynamic registration.
1409
+ */
1410
+ dynamicRegistration?: boolean;
1411
+ /**
1412
+ * The client supports the following `SignatureInformation`
1413
+ * specific properties.
1414
+ */
1415
+ signatureInformation?: {
1416
+ /**
1417
+ * Client supports the follow content formats for the documentation
1418
+ * property. The order describes the preferred format of the client.
1419
+ */
1420
+ documentationFormat?: MarkupKind[];
1421
+ /**
1422
+ * Client capabilities specific to parameter information.
1423
+ */
1424
+ parameterInformation?: {
1425
+ /**
1426
+ * The client supports processing label offsets instead of a
1427
+ * simple label string.
1428
+ *
1429
+ * @since 3.14.0
1430
+ */
1431
+ labelOffsetSupport?: boolean;
1432
+ };
1433
+ };
1434
+ /**
1435
+ * The client supports to send additional context information for a
1436
+ * `textDocument/signatureHelp` request. A client that opts into
1437
+ * contextSupport will also support the `retriggerCharacters` on
1438
+ * `SignatureHelpOptions`.
1439
+ *
1440
+ * @since 3.15.0
1441
+ */
1442
+ contextSupport?: boolean;
1443
+ }
1444
+ /**
1445
+ * Server Capabilities for a [SignatureHelpRequest](#SignatureHelpRequest).
1446
+ */
1447
+ export interface SignatureHelpOptions extends WorkDoneProgressOptions {
1448
+ /**
1449
+ * List of characters that trigger signature help.
1450
+ */
1451
+ triggerCharacters?: string[];
1452
+ /**
1453
+ * List of characters that re-trigger signature help.
1454
+ *
1455
+ * These trigger characters are only active when signature help is already showing. All trigger characters
1456
+ * are also counted as re-trigger characters.
1457
+ *
1458
+ * @since 3.15.0
1459
+ */
1460
+ retriggerCharacters?: string[];
1461
+ }
1462
+ /**
1463
+ * How a signature help was triggered.
1464
+ *
1465
+ * @since 3.15.0
1466
+ */
1467
+ export declare namespace SignatureHelpTriggerKind {
1468
+ /**
1469
+ * Signature help was invoked manually by the user or by a command.
1470
+ */
1471
+ const Invoked: 1;
1472
+ /**
1473
+ * Signature help was triggered by a trigger character.
1474
+ */
1475
+ const TriggerCharacter: 2;
1476
+ /**
1477
+ * Signature help was triggered by the cursor moving or by the document content changing.
1478
+ */
1479
+ const ContentChange: 3;
1480
+ }
1481
+ export declare type SignatureHelpTriggerKind = 1 | 2 | 3;
1482
+ /**
1483
+ * Additional information about the context in which a signature help request was triggered.
1484
+ *
1485
+ * @since 3.15.0
1486
+ */
1487
+ export interface SignatureHelpContext {
1488
+ /**
1489
+ * Action that caused signature help to be triggered.
1490
+ */
1491
+ triggerKind: SignatureHelpTriggerKind;
1492
+ /**
1493
+ * Character that caused signature help to be triggered.
1494
+ *
1495
+ * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
1496
+ */
1497
+ triggerCharacter?: string;
1498
+ /**
1499
+ * `true` if signature help was already showing when it was triggered.
1500
+ *
1501
+ * Retriggers occur when the signature help is already active and can be caused by actions such as
1502
+ * typing a trigger character, a cursor move, or document content changes.
1503
+ */
1504
+ isRetrigger: boolean;
1505
+ /**
1506
+ * The currently active `SignatureHelp`.
1507
+ *
1508
+ * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
1509
+ * the user navigating through available signatures.
1510
+ */
1511
+ activeSignatureHelp?: SignatureHelp;
1480
1512
  }
1481
1513
  /**
1482
1514
  * Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
1483
1515
  */
1484
1516
  export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1517
+ /**
1518
+ * The signature help context. This is only available if the client specifies
1519
+ * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
1520
+ *
1521
+ * @since 3.15.0
1522
+ */
1523
+ context?: SignatureHelpContext;
1485
1524
  }
1486
1525
  /**
1487
1526
  * Registration options for a [SignatureHelpRequest](#SignatureHelpRequest).
@@ -1489,10 +1528,31 @@ export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDon
1489
1528
  export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions {
1490
1529
  }
1491
1530
  export declare namespace SignatureHelpRequest {
1492
- const type: RequestType<SignatureHelpParams, SignatureHelp | null, void, SignatureHelpRegistrationOptions>;
1531
+ const method: 'textDocument/signatureHelp';
1532
+ const type: ProtocolRequestType<SignatureHelpParams, SignatureHelp | null, never, void, SignatureHelpRegistrationOptions>;
1493
1533
  }
1494
1534
  /**
1495
- * Parameters for a [DefinitionParams](#DefinitionParams).
1535
+ * Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
1536
+ */
1537
+ export interface DefinitionClientCapabilities {
1538
+ /**
1539
+ * Whether definition supports dynamic registration.
1540
+ */
1541
+ dynamicRegistration?: boolean;
1542
+ /**
1543
+ * The client supports additional metadata in the form of definition links.
1544
+ *
1545
+ * @since 3.14.0
1546
+ */
1547
+ linkSupport?: boolean;
1548
+ }
1549
+ /**
1550
+ * Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
1551
+ */
1552
+ export interface DefinitionOptions extends WorkDoneProgressOptions {
1553
+ }
1554
+ /**
1555
+ * Parameters for a [DefinitionRequest](#DefinitionRequest).
1496
1556
  */
1497
1557
  export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1498
1558
  }
@@ -1508,9 +1568,20 @@ export interface DefinitionRegistrationOptions extends TextDocumentRegistrationO
1508
1568
  * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
1509
1569
  * to such.
1510
1570
  */
1511
- export declare namespace DefinitionRequest {
1512
- const type: RequestType<DefinitionParams, Location | Location[] | LocationLink[] | null, void, DefinitionRegistrationOptions>;
1513
- const resultType: ProgressType<Location[] | LocationLink[]>;
1571
+ export declare namespace DefinitionRequest {
1572
+ const method: 'textDocument/definition';
1573
+ const type: ProtocolRequestType<DefinitionParams, Location | Location[] | LocationLink[] | null, LocationLink[] | Location[], void, DefinitionRegistrationOptions>;
1574
+ /** @deprecated Use DefinitionRequest.type */
1575
+ const resultType: ProgressType<LocationLink[] | Location[]>;
1576
+ }
1577
+ /**
1578
+ * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
1579
+ */
1580
+ export interface ReferenceClientCapabilities {
1581
+ /**
1582
+ * Whether references supports dynamic registration.
1583
+ */
1584
+ dynamicRegistration?: boolean;
1514
1585
  }
1515
1586
  /**
1516
1587
  * Parameters for a [ReferencesRequest](#ReferencesRequest).
@@ -1518,6 +1589,11 @@ export declare namespace DefinitionRequest {
1518
1589
  export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1519
1590
  context: ReferenceContext;
1520
1591
  }
1592
+ /**
1593
+ * Reference options.
1594
+ */
1595
+ export interface ReferenceOptions extends WorkDoneProgressOptions {
1596
+ }
1521
1597
  /**
1522
1598
  * Registration options for a [ReferencesRequest](#ReferencesRequest).
1523
1599
  */
@@ -1530,14 +1606,30 @@ export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOp
1530
1606
  * [Location[]](#Location) or a Thenable that resolves to such.
1531
1607
  */
1532
1608
  export declare namespace ReferencesRequest {
1533
- const type: RequestType<ReferenceParams, Location[] | null, void, ReferenceRegistrationOptions>;
1609
+ const method: 'textDocument/references';
1610
+ const type: ProtocolRequestType<ReferenceParams, Location[] | null, Location[], void, ReferenceRegistrationOptions>;
1611
+ /** @deprecated Use ReferencesRequest.type */
1534
1612
  const resultType: ProgressType<Location[]>;
1535
1613
  }
1614
+ /**
1615
+ * Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1616
+ */
1617
+ export interface DocumentHighlightClientCapabilities {
1618
+ /**
1619
+ * Whether document highlight supports dynamic registration.
1620
+ */
1621
+ dynamicRegistration?: boolean;
1622
+ }
1536
1623
  /**
1537
1624
  * Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1538
1625
  */
1539
1626
  export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
1540
1627
  }
1628
+ /**
1629
+ * Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1630
+ */
1631
+ export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
1632
+ }
1541
1633
  /**
1542
1634
  * Registration options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
1543
1635
  */
@@ -1550,9 +1642,40 @@ export interface DocumentHighlightRegistrationOptions extends TextDocumentRegist
1550
1642
  * (#DocumentHighlight) or a Thenable that resolves to such.
1551
1643
  */
1552
1644
  export declare namespace DocumentHighlightRequest {
1553
- const type: RequestType<DocumentHighlightParams, DocumentHighlight[] | null, void, DocumentHighlightRegistrationOptions>;
1645
+ const method: 'textDocument/documentHighlight';
1646
+ const type: ProtocolRequestType<DocumentHighlightParams, DocumentHighlight[] | null, DocumentHighlight[], void, DocumentHighlightRegistrationOptions>;
1647
+ /** @deprecated Use DocumentHighlightRequest.type */
1554
1648
  const resultType: ProgressType<DocumentHighlight[]>;
1555
1649
  }
1650
+ /**
1651
+ * Client Capabilities for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1652
+ */
1653
+ export interface DocumentSymbolClientCapabilities {
1654
+ /**
1655
+ * Whether document symbol supports dynamic registration.
1656
+ */
1657
+ dynamicRegistration?: boolean;
1658
+ /**
1659
+ * Specific capabilities for the `SymbolKind`.
1660
+ */
1661
+ symbolKind?: {
1662
+ /**
1663
+ * The symbol kind values the client supports. When this
1664
+ * property exists the client also guarantees that it will
1665
+ * handle values outside its set gracefully and falls back
1666
+ * to a default value when unknown.
1667
+ *
1668
+ * If this property is not present the client only supports
1669
+ * the symbol kinds from `File` to `Array` as defined in
1670
+ * the initial version of the protocol.
1671
+ */
1672
+ valueSet?: SymbolKind[];
1673
+ };
1674
+ /**
1675
+ * The client support hierarchical document symbols.
1676
+ */
1677
+ hierarchicalDocumentSymbolSupport?: boolean;
1678
+ }
1556
1679
  /**
1557
1680
  * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1558
1681
  */
@@ -1562,6 +1685,11 @@ export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialRes
1562
1685
  */
1563
1686
  textDocument: TextDocumentIdentifier;
1564
1687
  }
1688
+ /**
1689
+ * Provider options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1690
+ */
1691
+ export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
1692
+ }
1565
1693
  /**
1566
1694
  * Registration options for a [DocumentSymbolRequest](#DocumentSymbolRequest).
1567
1695
  */
@@ -1574,32 +1702,45 @@ export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrat
1574
1702
  * that resolves to such.
1575
1703
  */
1576
1704
  export declare namespace DocumentSymbolRequest {
1577
- const type: RequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, void, DocumentSymbolRegistrationOptions>;
1705
+ const method: 'textDocument/documentSymbol';
1706
+ const type: ProtocolRequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, DocumentSymbol[] | SymbolInformation[], void, DocumentSymbolRegistrationOptions>;
1707
+ /** @deprecated Use DocumentSymbolRequest.type */
1578
1708
  const resultType: ProgressType<DocumentSymbol[] | SymbolInformation[]>;
1579
1709
  }
1580
1710
  /**
1581
- * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1711
+ * The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
1582
1712
  */
1583
- export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
1713
+ export interface CodeActionClientCapabilities {
1584
1714
  /**
1585
- * A non-empty query string
1715
+ * Whether code action supports dynamic registration.
1586
1716
  */
1587
- query: string;
1588
- }
1589
- /**
1590
- * Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1591
- */
1592
- export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
1593
- }
1594
- /**
1595
- * A request to list project-wide symbols matching the query string given
1596
- * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
1597
- * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
1598
- * resolves to such.
1599
- */
1600
- export declare namespace WorkspaceSymbolRequest {
1601
- const type: RequestType<WorkspaceSymbolParams, SymbolInformation[] | null, void, WorkspaceSymbolRegistrationOptions>;
1602
- const resultType: ProgressType<SymbolInformation[]>;
1717
+ dynamicRegistration?: boolean;
1718
+ /**
1719
+ * The client support code action literals as a valid
1720
+ * response of the `textDocument/codeAction` request.
1721
+ *
1722
+ * @since 3.8.0
1723
+ */
1724
+ codeActionLiteralSupport?: {
1725
+ /**
1726
+ * The code action kind is support with the following value
1727
+ * set.
1728
+ */
1729
+ codeActionKind: {
1730
+ /**
1731
+ * The code action kind values the client supports. When this
1732
+ * property exists the client also guarantees that it will
1733
+ * handle values outside its set gracefully and falls back
1734
+ * to a default value when unknown.
1735
+ */
1736
+ valueSet: CodeActionKind[];
1737
+ };
1738
+ };
1739
+ /**
1740
+ * Whether code action supports the `isPreferred` property.
1741
+ * @since 3.15.0
1742
+ */
1743
+ isPreferredSupport?: boolean;
1603
1744
  }
1604
1745
  /**
1605
1746
  * The parameters of a [CodeActionRequest](#CodeActionRequest).
@@ -1618,6 +1759,18 @@ export interface CodeActionParams extends WorkDoneProgressParams, PartialResultP
1618
1759
  */
1619
1760
  context: CodeActionContext;
1620
1761
  }
1762
+ /**
1763
+ * Provider options for a [CodeActionRequest](#CodeActionRequest).
1764
+ */
1765
+ export interface CodeActionOptions extends WorkDoneProgressOptions {
1766
+ /**
1767
+ * CodeActionKinds that this server may return.
1768
+ *
1769
+ * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
1770
+ * may list out every specific kind they provide.
1771
+ */
1772
+ codeActionKinds?: CodeActionKind[];
1773
+ }
1621
1774
  /**
1622
1775
  * Registration options for a [CodeActionRequest](#CodeActionRequest).
1623
1776
  */
@@ -1627,9 +1780,77 @@ export interface CodeActionRegistrationOptions extends TextDocumentRegistrationO
1627
1780
  * A request to provide commands for the given text document and range.
1628
1781
  */
1629
1782
  export declare namespace CodeActionRequest {
1630
- const type: RequestType<CodeActionParams, (Command | CodeAction)[] | null, void, CodeActionRegistrationOptions>;
1783
+ const method: 'textDocument/codeAction';
1784
+ const type: ProtocolRequestType<CodeActionParams, (Command | CodeAction)[] | null, (Command | CodeAction)[], void, CodeActionRegistrationOptions>;
1785
+ /** @deprecated Use CodeActionRequest.type */
1631
1786
  const resultType: ProgressType<(Command | CodeAction)[]>;
1632
1787
  }
1788
+ /**
1789
+ * Client capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1790
+ */
1791
+ export interface WorkspaceSymbolClientCapabilities {
1792
+ /**
1793
+ * Symbol request supports dynamic registration.
1794
+ */
1795
+ dynamicRegistration?: boolean;
1796
+ /**
1797
+ * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
1798
+ */
1799
+ symbolKind?: {
1800
+ /**
1801
+ * The symbol kind values the client supports. When this
1802
+ * property exists the client also guarantees that it will
1803
+ * handle values outside its set gracefully and falls back
1804
+ * to a default value when unknown.
1805
+ *
1806
+ * If this property is not present the client only supports
1807
+ * the symbol kinds from `File` to `Array` as defined in
1808
+ * the initial version of the protocol.
1809
+ */
1810
+ valueSet?: SymbolKind[];
1811
+ };
1812
+ }
1813
+ /**
1814
+ * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1815
+ */
1816
+ export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
1817
+ /**
1818
+ * A query string to filter symbols by. Clients may send an empty
1819
+ * string here to request all symbols.
1820
+ */
1821
+ query: string;
1822
+ }
1823
+ /**
1824
+ * Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1825
+ */
1826
+ export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
1827
+ }
1828
+ /**
1829
+ * Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
1830
+ */
1831
+ export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
1832
+ }
1833
+ /**
1834
+ * A request to list project-wide symbols matching the query string given
1835
+ * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
1836
+ * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
1837
+ * resolves to such.
1838
+ */
1839
+ export declare namespace WorkspaceSymbolRequest {
1840
+ const method: 'workspace/symbol';
1841
+ const type: ProtocolRequestType<WorkspaceSymbolParams, SymbolInformation[] | null, SymbolInformation[], void, WorkspaceSymbolRegistrationOptions>;
1842
+ /** @deprecated Use WorkspaceSymbolRequest.type */
1843
+ const resultType: ProgressType<SymbolInformation[]>;
1844
+ }
1845
+ /**
1846
+ * The client capabilities of a [CodeLensRequest](#CodeLensRequest).
1847
+ */
1848
+ export interface CodeLensClientCapabilities {
1849
+ /**
1850
+ * Whether code lens supports dynamic registration.
1851
+ */
1852
+ dynamicRegistration?: boolean;
1853
+ }
1633
1854
  /**
1634
1855
  * The parameters of a [CodeLensRequest](#CodeLensRequest).
1635
1856
  */
@@ -1639,6 +1860,15 @@ export interface CodeLensParams extends WorkDoneProgressParams, PartialResultPar
1639
1860
  */
1640
1861
  textDocument: TextDocumentIdentifier;
1641
1862
  }
1863
+ /**
1864
+ * Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
1865
+ */
1866
+ export interface CodeLensOptions extends WorkDoneProgressOptions {
1867
+ /**
1868
+ * Code lens has a resolve provider as well.
1869
+ */
1870
+ resolveProvider?: boolean;
1871
+ }
1642
1872
  /**
1643
1873
  * Registration options for a [CodeLensRequest](#CodeLensRequest).
1644
1874
  */
@@ -1648,14 +1878,79 @@ export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOpt
1648
1878
  * A request to provide code lens for the given text document.
1649
1879
  */
1650
1880
  export declare namespace CodeLensRequest {
1651
- const type: RequestType<CodeLensParams, CodeLens[] | null, void, CodeLensRegistrationOptions>;
1881
+ const type: ProtocolRequestType<CodeLensParams, CodeLens[] | null, CodeLens[], void, CodeLensRegistrationOptions>;
1882
+ /** @deprecated Use CodeLensRequest.type */
1652
1883
  const resultType: ProgressType<CodeLens[]>;
1653
1884
  }
1654
1885
  /**
1655
1886
  * A request to resolve a command for a given code lens.
1656
1887
  */
1657
1888
  export declare namespace CodeLensResolveRequest {
1658
- const type: RequestType<CodeLens, CodeLens, void, void>;
1889
+ const type: ProtocolRequestType<CodeLens, CodeLens, never, void, void>;
1890
+ }
1891
+ /**
1892
+ * The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
1893
+ */
1894
+ export interface DocumentLinkClientCapabilities {
1895
+ /**
1896
+ * Whether document link supports dynamic registration.
1897
+ */
1898
+ dynamicRegistration?: boolean;
1899
+ /**
1900
+ * Whether the client support the `tooltip` property on `DocumentLink`.
1901
+ *
1902
+ * @since 3.15.0
1903
+ */
1904
+ tooltipSupport?: boolean;
1905
+ }
1906
+ /**
1907
+ * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
1908
+ */
1909
+ export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
1910
+ /**
1911
+ * The document to provide document links for.
1912
+ */
1913
+ textDocument: TextDocumentIdentifier;
1914
+ }
1915
+ /**
1916
+ * Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
1917
+ */
1918
+ export interface DocumentLinkOptions extends WorkDoneProgressOptions {
1919
+ /**
1920
+ * Document links have a resolve provider as well.
1921
+ */
1922
+ resolveProvider?: boolean;
1923
+ }
1924
+ /**
1925
+ * Registration options for a [DocumentLinkRequest](#DocumentLinkRequest).
1926
+ */
1927
+ export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
1928
+ }
1929
+ /**
1930
+ * A request to provide document links
1931
+ */
1932
+ export declare namespace DocumentLinkRequest {
1933
+ const method: 'textDocument/documentLink';
1934
+ const type: ProtocolRequestType<DocumentLinkParams, DocumentLink[] | null, DocumentLink[], void, DocumentLinkRegistrationOptions>;
1935
+ /** @deprecated Use DocumentLinkRequest.type */
1936
+ const resultType: ProgressType<DocumentLink[]>;
1937
+ }
1938
+ /**
1939
+ * Request to resolve additional information for a given document link. The request's
1940
+ * parameter is of type [DocumentLink](#DocumentLink) the response
1941
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
1942
+ */
1943
+ export declare namespace DocumentLinkResolveRequest {
1944
+ const type: ProtocolRequestType<DocumentLink, DocumentLink, never, void, void>;
1945
+ }
1946
+ /**
1947
+ * Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
1948
+ */
1949
+ export interface DocumentFormattingClientCapabilities {
1950
+ /**
1951
+ * Whether formatting supports dynamic registration.
1952
+ */
1953
+ dynamicRegistration?: boolean;
1659
1954
  }
1660
1955
  /**
1661
1956
  * The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
@@ -1670,6 +1965,11 @@ export interface DocumentFormattingParams extends WorkDoneProgressParams {
1670
1965
  */
1671
1966
  options: FormattingOptions;
1672
1967
  }
1968
+ /**
1969
+ * Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1970
+ */
1971
+ export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
1972
+ }
1673
1973
  /**
1674
1974
  * Registration options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
1675
1975
  */
@@ -1679,7 +1979,17 @@ export interface DocumentFormattingRegistrationOptions extends TextDocumentRegis
1679
1979
  * A request to to format a whole document.
1680
1980
  */
1681
1981
  export declare namespace DocumentFormattingRequest {
1682
- const type: RequestType<DocumentFormattingParams, TextEdit[] | null, void, DocumentFormattingRegistrationOptions>;
1982
+ const method: 'textDocument/formatting';
1983
+ const type: ProtocolRequestType<DocumentFormattingParams, TextEdit[] | null, never, void, DocumentFormattingRegistrationOptions>;
1984
+ }
1985
+ /**
1986
+ * Client capabilities of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1987
+ */
1988
+ export interface DocumentRangeFormattingClientCapabilities {
1989
+ /**
1990
+ * Whether range formatting supports dynamic registration.
1991
+ */
1992
+ dynamicRegistration?: boolean;
1683
1993
  }
1684
1994
  /**
1685
1995
  * The parameters of a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
@@ -1698,6 +2008,11 @@ export interface DocumentRangeFormattingParams extends WorkDoneProgressParams {
1698
2008
  */
1699
2009
  options: FormattingOptions;
1700
2010
  }
2011
+ /**
2012
+ * Provider options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
2013
+ */
2014
+ export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
2015
+ }
1701
2016
  /**
1702
2017
  * Registration options for a [DocumentRangeFormattingRequest](#DocumentRangeFormattingRequest).
1703
2018
  */
@@ -1707,7 +2022,17 @@ export interface DocumentRangeFormattingRegistrationOptions extends TextDocument
1707
2022
  * A request to to format a range in a document.
1708
2023
  */
1709
2024
  export declare namespace DocumentRangeFormattingRequest {
1710
- const type: RequestType<DocumentRangeFormattingParams, TextEdit[] | null, void, DocumentRangeFormattingRegistrationOptions>;
2025
+ const method: 'textDocument/rangeFormatting';
2026
+ const type: ProtocolRequestType<DocumentRangeFormattingParams, TextEdit[] | null, never, void, DocumentRangeFormattingRegistrationOptions>;
2027
+ }
2028
+ /**
2029
+ * Client capabilities of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2030
+ */
2031
+ export interface DocumentOnTypeFormattingClientCapabilities {
2032
+ /**
2033
+ * Whether on type formatting supports dynamic registration.
2034
+ */
2035
+ dynamicRegistration?: boolean;
1711
2036
  }
1712
2037
  /**
1713
2038
  * The parameters of a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
@@ -1730,6 +2055,19 @@ export interface DocumentOnTypeFormattingParams {
1730
2055
  */
1731
2056
  options: FormattingOptions;
1732
2057
  }
2058
+ /**
2059
+ * Provider options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
2060
+ */
2061
+ export interface DocumentOnTypeFormattingOptions {
2062
+ /**
2063
+ * A character on which formatting should be triggered, like `}`.
2064
+ */
2065
+ firstTriggerCharacter: string;
2066
+ /**
2067
+ * More trigger characters.
2068
+ */
2069
+ moreTriggerCharacter?: string[];
2070
+ }
1733
2071
  /**
1734
2072
  * Registration options for a [DocumentOnTypeFormattingRequest](#DocumentOnTypeFormattingRequest).
1735
2073
  */
@@ -1739,7 +2077,21 @@ export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumen
1739
2077
  * A request to format a document on type.
1740
2078
  */
1741
2079
  export declare namespace DocumentOnTypeFormattingRequest {
1742
- const type: RequestType<DocumentOnTypeFormattingParams, TextEdit[] | null, void, DocumentOnTypeFormattingRegistrationOptions>;
2080
+ const method: 'textDocument/onTypeFormatting';
2081
+ const type: ProtocolRequestType<DocumentOnTypeFormattingParams, TextEdit[] | null, never, void, DocumentOnTypeFormattingRegistrationOptions>;
2082
+ }
2083
+ export interface RenameClientCapabilities {
2084
+ /**
2085
+ * Whether rename supports dynamic registration.
2086
+ */
2087
+ dynamicRegistration?: boolean;
2088
+ /**
2089
+ * Client supports testing for validity of rename operations
2090
+ * before execution.
2091
+ *
2092
+ * @since version 3.12.0
2093
+ */
2094
+ prepareSupport?: boolean;
1743
2095
  }
1744
2096
  /**
1745
2097
  * The parameters of a [RenameRequest](#RenameRequest).
@@ -1760,6 +2112,17 @@ export interface RenameParams extends WorkDoneProgressParams {
1760
2112
  */
1761
2113
  newName: string;
1762
2114
  }
2115
+ /**
2116
+ * Provider options for a [RenameRequest](#RenameRequest).
2117
+ */
2118
+ export interface RenameOptions extends WorkDoneProgressOptions {
2119
+ /**
2120
+ * Renames should be checked and tested before being executed.
2121
+ *
2122
+ * @since version 3.12.0
2123
+ */
2124
+ prepareProvider?: boolean;
2125
+ }
1763
2126
  /**
1764
2127
  * Registration options for a [RenameRequest](#RenameRequest).
1765
2128
  */
@@ -1769,7 +2132,8 @@ export interface RenameRegistrationOptions extends TextDocumentRegistrationOptio
1769
2132
  * A request to rename a symbol.
1770
2133
  */
1771
2134
  export declare namespace RenameRequest {
1772
- const type: RequestType<RenameParams, WorkspaceEdit | null, void, RenameRegistrationOptions>;
2135
+ const method: 'textDocument/rename';
2136
+ const type: ProtocolRequestType<RenameParams, WorkspaceEdit | null, never, void, RenameRegistrationOptions>;
1773
2137
  }
1774
2138
  export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
1775
2139
  }
@@ -1777,39 +2141,20 @@ export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDon
1777
2141
  * A request to test and perform the setup necessary for a rename.
1778
2142
  */
1779
2143
  export declare namespace PrepareRenameRequest {
1780
- const type: RequestType<PrepareRenameParams, Range | {
2144
+ const method: 'textDocument/prepareRename';
2145
+ const type: ProtocolRequestType<PrepareRenameParams, Range | {
1781
2146
  range: Range;
1782
2147
  placeholder: string;
1783
- } | null, void, void>;
2148
+ } | null, never, void, void>;
1784
2149
  }
1785
2150
  /**
1786
- * The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
2151
+ * The client capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
1787
2152
  */
1788
- export interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
2153
+ export interface ExecuteCommandClientCapabilities {
1789
2154
  /**
1790
- * The document to provide document links for.
2155
+ * Execute command supports dynamic registration.
1791
2156
  */
1792
- textDocument: TextDocumentIdentifier;
1793
- }
1794
- /**
1795
- * Registration options for a [DocumentLinkRequest](#DocumentLinkRequest).
1796
- */
1797
- export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
1798
- }
1799
- /**
1800
- * A request to provide document links
1801
- */
1802
- export declare namespace DocumentLinkRequest {
1803
- const type: RequestType<DocumentLinkParams, DocumentLink[] | null, void, DocumentLinkRegistrationOptions>;
1804
- const resultType: ProgressType<DocumentLink[]>;
1805
- }
1806
- /**
1807
- * Request to resolve additional information for a given document link. The request's
1808
- * parameter is of type [DocumentLink](#DocumentLink) the response
1809
- * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
1810
- */
1811
- export declare namespace DocumentLinkResolveRequest {
1812
- const type: RequestType<DocumentLink, DocumentLink, void, void>;
2157
+ dynamicRegistration?: boolean;
1813
2158
  }
1814
2159
  /**
1815
2160
  * The parameters of a [ExecuteCommandRequest](#ExecuteCommandRequest).
@@ -1824,6 +2169,15 @@ export interface ExecuteCommandParams extends WorkDoneProgressParams {
1824
2169
  */
1825
2170
  arguments?: any[];
1826
2171
  }
2172
+ /**
2173
+ * The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
2174
+ */
2175
+ export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
2176
+ /**
2177
+ * The commands to be executed on the server
2178
+ */
2179
+ commands: string[];
2180
+ }
1827
2181
  /**
1828
2182
  * Registration options for a [ExecuteCommandRequest](#ExecuteCommandRequest).
1829
2183
  */
@@ -1834,7 +2188,27 @@ export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions
1834
2188
  * a workspace edit which the client will apply to the workspace.
1835
2189
  */
1836
2190
  export declare namespace ExecuteCommandRequest {
1837
- const type: RequestType<ExecuteCommandParams, any, void, ExecuteCommandRegistrationOptions>;
2191
+ const type: ProtocolRequestType<ExecuteCommandParams, any, never, void, ExecuteCommandRegistrationOptions>;
2192
+ }
2193
+ export interface WorkspaceEditClientCapabilities {
2194
+ /**
2195
+ * The client supports versioned document changes in `WorkspaceEdit`s
2196
+ */
2197
+ documentChanges?: boolean;
2198
+ /**
2199
+ * The resource operations the client supports. Clients should at least
2200
+ * support 'create', 'rename' and 'delete' files and folders.
2201
+ *
2202
+ * @since 3.13.0
2203
+ */
2204
+ resourceOperations?: ResourceOperationKind[];
2205
+ /**
2206
+ * The failure handling strategy of a client if applying the workspace edit
2207
+ * fails.
2208
+ *
2209
+ * @since 3.13.0
2210
+ */
2211
+ failureHandling?: FailureHandlingKind;
1838
2212
  }
1839
2213
  /**
1840
2214
  * The parameters passed via a apply workspace edit request.
@@ -1876,7 +2250,7 @@ export interface ApplyWorkspaceEditResponse {
1876
2250
  * A request sent from the server to the client to modified certain resources.
1877
2251
  */
1878
2252
  export declare namespace ApplyWorkspaceEditRequest {
1879
- const type: RequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, void, void>;
2253
+ const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, never, void, void>;
1880
2254
  }
1881
- export { ImplementationRequest, TypeDefinitionRequest, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, ColorOptions, DocumentColorParams, ColorPresentationParams, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities, DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeServerCapabilities, SelectionRangeParams, SelectionRangeRequest };
1882
- export { ColorOptions as ColorProviderOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions };
2255
+ 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 };
2256
+ export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };