@codingame/monaco-languageclient-wrapper 2.5.5 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/dist/index.d.ts +1802 -885
  2. package/dist/index.js +19317 -9119
  3. package/package.json +25 -27
  4. package/stats.html +1 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- /// <reference path="../node_modules/vscode-languageclient/typings/vscode-proposed.d.ts" />
2
- import { NotificationType as NotificationType$2, RequestType as RequestType$2, TextDocumentSaveReason as TextDocumentSaveReason$1 } from 'vscode-languageserver-protocol/lib/common/api';
1
+ import { NotificationType as NotificationType$1, RequestType as RequestType$1, TextDocumentSaveReason as TextDocumentSaveReason$1 } from 'vscode-languageserver-protocol/lib/common/api';
3
2
  export { TextDocumentSaveReason } from 'vscode-languageserver-protocol/lib/common/api';
4
3
  import * as ls from 'vscode-languageserver-protocol';
5
- import { InitializeParams, InitializeResult, LogMessageParams, ShowMessageParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, PublishDiagnosticsParams, CancellationToken as CancellationToken$2, ConfigurationRequest, WorkspaceFoldersRequest, DocumentSelector, CancellationStrategy, Message as Message$1, ResponseError as ResponseError$1, InitializeError, MessageReader, MessageWriter, ProtocolRequestType0, ProtocolRequestType, RequestType0 as RequestType0$1, RequestType as RequestType$1, RequestHandler0 as RequestHandler0$1, RequestHandler as RequestHandler$1, GenericRequestHandler as GenericRequestHandler$1, ProtocolNotificationType0, ProtocolNotificationType, NotificationType0 as NotificationType0$1, NotificationType as NotificationType$1, NotificationHandler0 as NotificationHandler0$1, NotificationHandler as NotificationHandler$1, GenericNotificationHandler as GenericNotificationHandler$1, ProgressType as ProgressType$1, Event as Event$2, Trace as Trace$1, DidOpenTextDocumentNotification, TextDocumentRegistrationOptions, DidChangeTextDocumentNotification, WillSaveTextDocumentNotification, WillSaveTextDocumentWaitUntilRequest, DidSaveTextDocumentNotification, DidCloseTextDocumentNotification, DidCreateFilesNotification, FileOperationRegistrationOptions, DidRenameFilesNotification, DidDeleteFilesNotification, WillCreateFilesRequest, WillRenameFilesRequest, WillDeleteFilesRequest, CompletionRequest, HoverRequest, SignatureHelpRequest, DefinitionRequest, ReferencesRequest, DocumentHighlightRequest, CodeActionRequest, DocumentFormattingRequest, DocumentRangeFormattingRequest, DocumentOnTypeFormattingRequest, RenameRequest, DocumentSymbolRequest, DocumentLinkRequest, DocumentColorRequest, DeclarationRequest, FoldingRangeRequest, ImplementationRequest, SelectionRangeRequest, TypeDefinitionRequest, CallHierarchyPrepareRequest, SemanticTokensRegistrationType, LinkedEditingRangeRequest, WorkspaceSymbolRequest, MessageSignature as MessageSignature$1, ProgressToken, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, ClientCapabilities, ServerCapabilities, RegistrationType, FileEvent, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, MessageConnection } from 'vscode-languageserver-protocol';
6
- import { CreateFilesParams, RenameFilesParams, DeleteFilesParams } from 'vscode-languageserver-protocol/lib/common/protocol.fileOperations';
4
+ import { TextDocumentRegistrationOptions, DidOpenTextDocumentParams, DidCloseTextDocumentParams, TextDocumentChangeRegistrationOptions, DidChangeTextDocumentParams, DidSaveTextDocumentParams, CancellationToken as CancellationToken$2, DocumentSelector as DocumentSelector$1, InitializeParams, ClientCapabilities, ServerCapabilities, RegistrationType, ProtocolRequestType0, ProtocolRequestType, RequestType0, RequestType, RequestHandler0, RequestHandler, GenericRequestHandler, ProtocolNotificationType0, ProtocolNotificationType, NotificationType0, NotificationType, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, MessageSignature, DidOpenTextDocumentNotification, DidChangeTextDocumentNotification, WillSaveTextDocumentNotification, WillSaveTextDocumentWaitUntilRequest, DidSaveTextDocumentNotification, DidCloseTextDocumentNotification, DidCreateFilesNotification, FileOperationRegistrationOptions, DidRenameFilesNotification, DidDeleteFilesNotification, WillCreateFilesRequest, WillRenameFilesRequest, WillDeleteFilesRequest, CompletionRequest, HoverRequest, SignatureHelpRequest, DefinitionRequest, ReferencesRequest, DocumentHighlightRequest, CodeActionRequest, CodeLensRequest, DocumentFormattingRequest, DocumentRangeFormattingRequest, DocumentOnTypeFormattingRequest, RenameRequest, DocumentSymbolRequest, DocumentLinkRequest, DocumentColorRequest, DeclarationRequest, FoldingRangeRequest, ImplementationRequest, SelectionRangeRequest, TypeDefinitionRequest, CallHierarchyPrepareRequest, SemanticTokensRegistrationType, LinkedEditingRangeRequest, TypeHierarchyPrepareRequest, InlineValueRequest, InlayHintRequest, WorkspaceSymbolRequest, DocumentDiagnosticRequest, NotebookDocumentSyncRegistrationType, NotebookDocumentSyncRegistrationOptions, ConfigurationRequest, WorkspaceFoldersRequest, CancellationStrategy, MessageReader, MessageWriter, ResponseError, InitializeError, Message, Event as Event$2, InitializeResult, Trace, ProgressToken, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, FileEvent, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult } from 'vscode-languageserver-protocol';
7
5
  import * as monaco from 'monaco-editor';
8
6
 
9
7
  /**
@@ -987,7 +985,7 @@ declare class RelativePattern {
987
985
  * (like `**​/*.{ts,js}` or `*.{ts,js}`) or a {@link RelativePattern relative pattern}.
988
986
  *
989
987
  * Glob patterns can have the following syntax:
990
- * * `*` to match one or more characters in a path segment
988
+ * * `*` to match zero or more characters in a path segment
991
989
  * * `?` to match on one character in a path segment
992
990
  * * `**` to match any number of path segments, including none
993
991
  * * `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
@@ -1001,6 +999,62 @@ declare class RelativePattern {
1001
999
  */
1002
1000
  type GlobPattern = string | RelativePattern;
1003
1001
 
1002
+ /**
1003
+ * A document filter denotes a document by different properties like
1004
+ * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
1005
+ * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
1006
+ *
1007
+ * @example <caption>A language filter that applies to typescript files on disk</caption>
1008
+ * { language: 'typescript', scheme: 'file' }
1009
+ *
1010
+ * @example <caption>A language filter that applies to all package.json paths</caption>
1011
+ * { language: 'json', pattern: '**​/package.json' }
1012
+ */
1013
+ interface DocumentFilter {
1014
+
1015
+ /**
1016
+ * A language id, like `typescript`.
1017
+ */
1018
+ readonly language?: string;
1019
+
1020
+ /**
1021
+ * The {@link NotebookDocument.notebookType type} of a notebook, like `jupyter-notebook`. This allows
1022
+ * to narrow down on the type of a notebook that a {@link NotebookCell.document cell document} belongs to.
1023
+ *
1024
+ * *Note* that setting the `notebookType`-property changes how `scheme` and `pattern` are interpreted. When set
1025
+ * they are evaluated against the {@link NotebookDocument.uri notebook uri}, not the document uri.
1026
+ *
1027
+ * @example <caption>Match python document inside jupyter notebook that aren't stored yet (`untitled`)</caption>
1028
+ * { language: 'python', notebookType: 'jupyter-notebook', scheme: 'untitled' }
1029
+ */
1030
+ readonly notebookType?: string;
1031
+
1032
+ /**
1033
+ * A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
1034
+ */
1035
+ readonly scheme?: string;
1036
+
1037
+ /**
1038
+ * A {@link GlobPattern glob pattern} that is matched on the absolute path of the document. Use a {@link RelativePattern relative pattern}
1039
+ * to filter documents to a {@link WorkspaceFolder workspace folder}.
1040
+ */
1041
+ readonly pattern?: GlobPattern;
1042
+ }
1043
+
1044
+ /**
1045
+ * A language selector is the combination of one or many language identifiers
1046
+ * and {@link DocumentFilter language filters}.
1047
+ *
1048
+ * *Note* that a document selector that is just a language identifier selects *all*
1049
+ * documents, even those that are not saved on disk. Only use such selectors when
1050
+ * a feature works without further context, e.g. without the need to resolve related
1051
+ * 'files'.
1052
+ *
1053
+ * @example
1054
+ * let sel:DocumentSelector = { scheme: 'file', language: 'typescript' };
1055
+ */
1056
+ type DocumentSelector = DocumentFilter | string | ReadonlyArray<DocumentFilter | string>;
1057
+
1004
1058
  /**
1005
1059
  * A provider result represents the values a provider, like the {@linkcode HoverProvider},
1006
1060
  * may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
@@ -1204,7 +1258,7 @@ interface CodeActionContext {
1204
1258
  *
1205
1259
  * A CodeAction must set either {@linkcode CodeAction.edit edit} and/or a {@linkcode CodeAction.command command}. If both are supplied, the `edit` is applied first, then the command is executed.
1206
1260
  */
1207
- declare class CodeAction$1 {
1261
+ declare class CodeAction {
1208
1262
 
1209
1263
  /**
1210
1264
  * A short, human-readable, title for this code action.
@@ -1285,7 +1339,7 @@ declare class CodeAction$1 {
1285
1339
  *
1286
1340
  * A code action can be any command that is {@link commands.getCommands known} to the system.
1287
1341
  */
1288
- interface CodeActionProvider<T extends CodeAction$1 = CodeAction$1> {
1342
+ interface CodeActionProvider<T extends CodeAction = CodeAction> {
1289
1343
  /**
1290
1344
  * Provide commands for the given document and range.
1291
1345
  *
@@ -1356,6 +1410,40 @@ declare class CodeLens {
1356
1410
  constructor(range: Range$1, command?: Command);
1357
1411
  }
1358
1412
 
1413
+ /**
1414
+ * A code lens provider adds {@link Command commands} to source text. The commands will be shown
1415
+ * as dedicated horizontal lines in between the source text.
1416
+ */
1417
+ interface CodeLensProvider<T extends CodeLens = CodeLens> {
1418
+
1419
+ /**
1420
+ * An optional event to signal that the code lenses from this provider have changed.
1421
+ */
1422
+ onDidChangeCodeLenses?: Event$1<void>;
1423
+
1424
+ /**
1425
+ * Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if
1426
+ * computing the commands is expensive implementors should only return code lens objects with the
1427
+ * range set and implement {@link CodeLensProvider.resolveCodeLens resolve}.
1428
+ *
1429
+ * @param document The document in which the command was invoked.
1430
+ * @param token A cancellation token.
1431
+ * @return An array of code lenses or a thenable that resolves to such. The lack of a result can be
1432
+ * signaled by returning `undefined`, `null`, or an empty array.
1433
+ */
1434
+ provideCodeLenses(document: TextDocument$1, token: CancellationToken$1): ProviderResult<T[]>;
1435
+
1436
+ /**
1437
+ * This function will be called for each visible code lens, usually when scrolling and after
1438
+ * calls to {@link CodeLensProvider.provideCodeLenses compute}-lenses.
1439
+ *
1440
+ * @param codeLens Code lens that must be resolved.
1441
+ * @param token A cancellation token.
1442
+ * @return The given, resolved code lens or thenable that resolves to such.
1443
+ */
1444
+ resolveCodeLens?(codeLens: T, token: CancellationToken$1): ProviderResult<T>;
1445
+ }
1446
+
1359
1447
  /**
1360
1448
  * Information about where a symbol is defined.
1361
1449
  *
@@ -1593,6 +1681,134 @@ interface HoverProvider {
1593
1681
  provideHover(document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<Hover>;
1594
1682
  }
1595
1683
 
1684
+ /**
1685
+ * Provide inline value as text.
1686
+ */
1687
+ declare class InlineValueText {
1688
+ /**
1689
+ * The document range for which the inline value applies.
1690
+ */
1691
+ readonly range: Range$1;
1692
+ /**
1693
+ * The text of the inline value.
1694
+ */
1695
+ readonly text: string;
1696
+ /**
1697
+ * Creates a new InlineValueText object.
1698
+ *
1699
+ * @param range The document line where to show the inline value.
1700
+ * @param text The value to be shown for the line.
1701
+ */
1702
+ constructor(range: Range$1, text: string);
1703
+ }
1704
+
1705
+ /**
1706
+ * Provide inline value through a variable lookup.
1707
+ * If only a range is specified, the variable name will be extracted from the underlying document.
1708
+ * An optional variable name can be used to override the extracted name.
1709
+ */
1710
+ declare class InlineValueVariableLookup {
1711
+ /**
1712
+ * The document range for which the inline value applies.
1713
+ * The range is used to extract the variable name from the underlying document.
1714
+ */
1715
+ readonly range: Range$1;
1716
+ /**
1717
+ * If specified the name of the variable to look up.
1718
+ */
1719
+ readonly variableName?: string | undefined;
1720
+ /**
1721
+ * How to perform the lookup.
1722
+ */
1723
+ readonly caseSensitiveLookup: boolean;
1724
+ /**
1725
+ * Creates a new InlineValueVariableLookup object.
1726
+ *
1727
+ * @param range The document line where to show the inline value.
1728
+ * @param variableName The name of the variable to look up.
1729
+ * @param caseSensitiveLookup How to perform the lookup. If missing lookup is case sensitive.
1730
+ */
1731
+ constructor(range: Range$1, variableName?: string, caseSensitiveLookup?: boolean);
1732
+ }
1733
+
1734
+ /**
1735
+ * Provide an inline value through an expression evaluation.
1736
+ * If only a range is specified, the expression will be extracted from the underlying document.
1737
+ * An optional expression can be used to override the extracted expression.
1738
+ */
1739
+ declare class InlineValueEvaluatableExpression {
1740
+ /**
1741
+ * The document range for which the inline value applies.
1742
+ * The range is used to extract the evaluatable expression from the underlying document.
1743
+ */
1744
+ readonly range: Range$1;
1745
+ /**
1746
+ * If specified the expression overrides the extracted expression.
1747
+ */
1748
+ readonly expression?: string | undefined;
1749
+ /**
1750
+ * Creates a new InlineValueEvaluatableExpression object.
1751
+ *
1752
+ * @param range The range in the underlying document from which the evaluatable expression is extracted.
1753
+ * @param expression If specified overrides the extracted expression.
1754
+ */
1755
+ constructor(range: Range$1, expression?: string);
1756
+ }
1757
+
1758
+ /**
1759
+ * Inline value information can be provided by different means:
1760
+ * - directly as a text value (class InlineValueText).
1761
+ * - as a name to use for a variable lookup (class InlineValueVariableLookup)
1762
+ * - as an evaluatable expression (class InlineValueEvaluatableExpression)
1763
+ * The InlineValue types combines all inline value types into one type.
1764
+ */
1765
+ type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression;
1766
+
1767
+ /**
1768
+ * A value-object that contains contextual information when requesting inline values from a InlineValuesProvider.
1769
+ */
1770
+ interface InlineValueContext {
1771
+
1772
+ /**
1773
+ * The stack frame (as a DAP Id) where the execution has stopped.
1774
+ */
1775
+ readonly frameId: number;
1776
+
1777
+ /**
1778
+ * The document range where execution has stopped.
1779
+ * Typically the end position of the range denotes the line where the inline values are shown.
1780
+ */
1781
+ readonly stoppedLocation: Range$1;
1782
+ }
1783
+
1784
+ /**
1785
+ * The inline values provider interface defines the contract between extensions and the editor's debugger inline values feature.
1786
+ * In this contract the provider returns inline value information for a given document range
1787
+ * and the editor shows this information in the editor at the end of lines.
1788
+ */
1789
+ interface InlineValuesProvider {
1790
+
1791
+ /**
1792
+ * An optional event to signal that inline values have changed.
1793
+ * @see {@link EventEmitter}
1794
+ */
1795
+ onDidChangeInlineValues?: Event$1<void> | undefined;
1796
+
1797
+ /**
1798
+ * Provide "inline value" information for a given document and range.
1799
+ * The editor calls this method whenever debugging stops in the given document.
1800
+ * The returned inline values information is rendered in the editor at the end of lines.
1801
+ *
1802
+ * @param document The document for which the inline values information is needed.
1803
+ * @param viewPort The visible document range for which inline values should be computed.
1804
+ * @param context A bag containing contextual information like the current location.
1805
+ * @param token A cancellation token.
1806
+ * @return An array of InlineValueDescriptors or a thenable that resolves to such. The lack of a result can be
1807
+ * signaled by returning `undefined` or `null`.
1808
+ */
1809
+ provideInlineValues(document: TextDocument$1, viewPort: Range$1, context: InlineValueContext, token: CancellationToken$1): ProviderResult<InlineValue[]>;
1810
+ }
1811
+
1596
1812
  /**
1597
1813
  * A document highlight kind.
1598
1814
  */
@@ -1878,7 +2094,7 @@ interface ReferenceContext {
1878
2094
  /**
1879
2095
  * Include the declaration of the current symbol.
1880
2096
  */
1881
- includeDeclaration: boolean;
2097
+ readonly includeDeclaration: boolean;
1882
2098
  }
1883
2099
 
1884
2100
  /**
@@ -2159,7 +2375,7 @@ declare class SnippetString {
2159
2375
  * value starting at 1.
2160
2376
  * @return This snippet string.
2161
2377
  */
2162
- appendChoice(values: string[], number?: number): SnippetString;
2378
+ appendChoice(values: readonly string[], number?: number): SnippetString;
2163
2379
 
2164
2380
  /**
2165
2381
  * Builder-function that appends a variable (`${VAR}`) to
@@ -2197,7 +2413,7 @@ interface RenameProvider {
2197
2413
  * be a range or a range and a placeholder text. The placeholder text should be the identifier of the symbol
2198
2414
  * which is being renamed - when omitted the text in the returned range is used.
2199
2415
  *
2200
- * *Note: * This function should throw an error or return a rejected thenable when the provided location
2416
+ * *Note:* This function should throw an error or return a rejected thenable when the provided location
2201
2417
  * doesn't allow for a rename.
2202
2418
  *
2203
2419
  * @param document The document in which rename will be invoked.
@@ -3176,6 +3392,176 @@ interface DocumentColorProvider {
3176
3392
  provideColorPresentations(color: Color, context: { readonly document: TextDocument$1; readonly range: Range$1 }, token: CancellationToken$1): ProviderResult<ColorPresentation[]>;
3177
3393
  }
3178
3394
 
3395
+ /**
3396
+ * Inlay hint kinds.
3397
+ *
3398
+ * The kind of an inline hint defines its appearance, e.g the corresponding foreground and background colors are being
3399
+ * used.
3400
+ */
3401
+ enum InlayHintKind {
3402
+ /**
3403
+ * An inlay hint that for a type annotation.
3404
+ */
3405
+ Type = 1,
3406
+ /**
3407
+ * An inlay hint that is for a parameter.
3408
+ */
3409
+ Parameter = 2,
3410
+ }
3411
+
3412
+ /**
3413
+ * An inlay hint label part allows for interactive and composite labels of inlay hints.
3414
+ */
3415
+ declare class InlayHintLabelPart {
3416
+
3417
+ /**
3418
+ * The value of this label part.
3419
+ */
3420
+ value: string;
3421
+
3422
+ /**
3423
+ * The tooltip text when you hover over this label part.
3424
+ *
3425
+ * *Note* that this property can be set late during
3426
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
3427
+ */
3428
+ tooltip?: string | MarkdownString | undefined;
3429
+
3430
+ /**
3431
+ * An optional {@link Location source code location} that represents this label
3432
+ * part.
3433
+ *
3434
+ * The editor will use this location for the hover and for code navigation features: This
3435
+ * part will become a clickable link that resolves to the definition of the symbol at the
3436
+ * given location (not necessarily the location itself), it shows the hover that shows at
3437
+ * the given location, and it shows a context menu with further code navigation commands.
3438
+ *
3439
+ * *Note* that this property can be set late during
3440
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
3441
+ */
3442
+ location?: Location | undefined;
3443
+
3444
+ /**
3445
+ * An optional command for this label part.
3446
+ *
3447
+ * The editor renders parts with commands as clickable links. The command is added to the context menu
3448
+ * when a label part defines {@link InlayHintLabelPart.location location} and {@link InlayHintLabelPart.command command} .
3449
+ *
3450
+ * *Note* that this property can be set late during
3451
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
3452
+ */
3453
+ command?: Command | undefined;
3454
+
3455
+ /**
3456
+ * Creates a new inlay hint label part.
3457
+ *
3458
+ * @param value The value of the part.
3459
+ */
3460
+ constructor(value: string);
3461
+ }
3462
+
3463
+ /**
3464
+ * Inlay hint information.
3465
+ */
3466
+ declare class InlayHint {
3467
+
3468
+ /**
3469
+ * The position of this hint.
3470
+ */
3471
+ position: Position$1;
3472
+
3473
+ /**
3474
+ * The label of this hint. A human readable string or an array of {@link InlayHintLabelPart label parts}.
3475
+ *
3476
+ * *Note* that neither the string nor the label part can be empty.
3477
+ */
3478
+ label: string | InlayHintLabelPart[];
3479
+
3480
+ /**
3481
+ * The tooltip text when you hover over this item.
3482
+ *
3483
+ * *Note* that this property can be set late during
3484
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
3485
+ */
3486
+ tooltip?: string | MarkdownString | undefined;
3487
+
3488
+ /**
3489
+ * The kind of this hint. The inlay hint kind defines the appearance of this inlay hint.
3490
+ */
3491
+ kind?: InlayHintKind;
3492
+
3493
+ /**
3494
+ * Optional {@link TextEdit text edits} that are performed when accepting this inlay hint. The default
3495
+ * gesture for accepting an inlay hint is the double click.
3496
+ *
3497
+ * *Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is
3498
+ * now part of the document and the inlay hint itself is now obsolete.
3499
+ *
3500
+ * *Note* that this property can be set late during
3501
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
3502
+ */
3503
+ textEdits?: TextEdit$1[];
3504
+
3505
+ /**
3506
+ * Render padding before the hint. Padding will use the editor's background color,
3507
+ * not the background color of the hint itself. That means padding can be used to visually
3508
+ * align/separate an inlay hint.
3509
+ */
3510
+ paddingLeft?: boolean;
3511
+
3512
+ /**
3513
+ * Render padding after the hint. Padding will use the editor's background color,
3514
+ * not the background color of the hint itself. That means padding can be used to visually
3515
+ * align/separate an inlay hint.
3516
+ */
3517
+ paddingRight?: boolean;
3518
+
3519
+ /**
3520
+ * Creates a new inlay hint.
3521
+ *
3522
+ * @param position The position of the hint.
3523
+ * @param label The label of the hint.
3524
+ * @param kind The {@link InlayHintKind kind} of the hint.
3525
+ */
3526
+ constructor(position: Position$1, label: string | InlayHintLabelPart[], kind?: InlayHintKind);
3527
+ }
3528
+
3529
+ /**
3530
+ * The inlay hints provider interface defines the contract between extensions and
3531
+ * the inlay hints feature.
3532
+ */
3533
+ interface InlayHintsProvider<T extends InlayHint = InlayHint> {
3534
+
3535
+ /**
3536
+ * An optional event to signal that inlay hints from this provider have changed.
3537
+ */
3538
+ onDidChangeInlayHints?: Event$1<void>;
3539
+
3540
+ /**
3541
+ * Provide inlay hints for the given range and document.
3542
+ *
3543
+ * *Note* that inlay hints that are not {@link Range.contains contained} by the given range are ignored.
3544
+ *
3545
+ * @param document The document in which the command was invoked.
3546
+ * @param range The range for which inlay hints should be computed.
3547
+ * @param token A cancellation token.
3548
+ * @return An array of inlay hints or a thenable that resolves to such.
3549
+ */
3550
+ provideInlayHints(document: TextDocument$1, range: Range$1, token: CancellationToken$1): ProviderResult<T[]>;
3551
+
3552
+ /**
3553
+ * Given an inlay hint fill in {@link InlayHint.tooltip tooltip}, {@link InlayHint.textEdits text edits},
3554
+ * or complete label {@link InlayHintLabelPart parts}.
3555
+ *
3556
+ * *Note* that the editor will resolve an inlay hint at most once.
3557
+ *
3558
+ * @param hint An inlay hint.
3559
+ * @param token A cancellation token.
3560
+ * @return The resolved inlay hint or a thenable that resolves to such. It is OK to return the given `item`. When no result is returned, the given `item` will be used.
3561
+ */
3562
+ resolveInlayHint?(hint: T, token: CancellationToken$1): ProviderResult<T>;
3563
+ }
3564
+
3179
3565
  /**
3180
3566
  * A line based folding range. To be valid, start and end line must be bigger than zero and smaller than the number of lines in the document.
3181
3567
  * Invalid ranges will be ignored.
@@ -3300,7 +3686,7 @@ interface SelectionRangeProvider {
3300
3686
  * @return Selection ranges or a thenable that resolves to such. The lack of a result can be
3301
3687
  * signaled by returning `undefined` or `null`.
3302
3688
  */
3303
- provideSelectionRanges(document: TextDocument$1, positions: Position$1[], token: CancellationToken$1): ProviderResult<SelectionRange[]>;
3689
+ provideSelectionRanges(document: TextDocument$1, positions: readonly Position$1[], token: CancellationToken$1): ProviderResult<SelectionRange[]>;
3304
3690
  }
3305
3691
 
3306
3692
  /**
@@ -3447,67 +3833,165 @@ interface CallHierarchyProvider {
3447
3833
  }
3448
3834
 
3449
3835
  /**
3450
- * Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.
3836
+ * Represents an item of a type hierarchy, like a class or an interface.
3451
3837
  */
3452
- declare class LinkedEditingRanges {
3838
+ declare class TypeHierarchyItem {
3453
3839
  /**
3454
- * Create a new linked editing ranges object.
3455
- *
3456
- * @param ranges A list of ranges that can be edited together
3457
- * @param wordPattern An optional word pattern that describes valid contents for the given ranges
3840
+ * The name of this item.
3458
3841
  */
3459
- constructor(ranges: Range$1[], wordPattern?: RegExp);
3842
+ name: string;
3460
3843
 
3461
3844
  /**
3462
- * A list of ranges that can be edited together. The ranges must have
3463
- * identical length and text content. The ranges cannot overlap.
3845
+ * The kind of this item.
3464
3846
  */
3465
- readonly ranges: Range$1[];
3847
+ kind: SymbolKind;
3466
3848
 
3467
3849
  /**
3468
- * An optional word pattern that describes valid contents for the given ranges.
3469
- * If no pattern is provided, the language configuration's word pattern will be used.
3850
+ * Tags for this item.
3470
3851
  */
3471
- readonly wordPattern: RegExp | undefined;
3472
- }
3852
+ tags?: ReadonlyArray<SymbolTag>;
3473
3853
 
3474
- /**
3475
- * The linked editing range provider interface defines the contract between extensions and
3476
- * the linked editing feature.
3477
- */
3478
- interface LinkedEditingRangeProvider {
3479
3854
  /**
3480
- * For a given position in a document, returns the range of the symbol at the position and all ranges
3481
- * that have the same content. A change to one of the ranges can be applied to all other ranges if the new content
3482
- * is valid. An optional word pattern can be returned with the result to describe valid contents.
3483
- * If no result-specific word pattern is provided, the word pattern from the language configuration is used.
3484
- *
3485
- * @param document The document in which the provider was invoked.
3486
- * @param position The position at which the provider was invoked.
3487
- * @param token A cancellation token.
3488
- * @return A list of ranges that can be edited together
3855
+ * More detail for this item, e.g. the signature of a function.
3489
3856
  */
3490
- provideLinkedEditingRanges(document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<LinkedEditingRanges>;
3491
- }
3857
+ detail?: string;
3492
3858
 
3493
- /**
3494
- * The configuration target
3495
- */
3496
- enum ConfigurationTarget {
3497
3859
  /**
3498
- * Global configuration
3499
- */
3500
- Global = 1,
3860
+ * The resource identifier of this item.
3861
+ */
3862
+ uri: Uri;
3501
3863
 
3502
3864
  /**
3503
- * Workspace configuration
3865
+ * The range enclosing this symbol not including leading/trailing whitespace
3866
+ * but everything else, e.g. comments and code.
3504
3867
  */
3505
- Workspace = 2,
3868
+ range: Range$1;
3506
3869
 
3507
3870
  /**
3508
- * Workspace folder configuration
3871
+ * The range that should be selected and revealed when this symbol is being
3872
+ * picked, e.g. the name of a class. Must be contained by the {@link TypeHierarchyItem.range range}-property.
3509
3873
  */
3510
- WorkspaceFolder = 3
3874
+ selectionRange: Range$1;
3875
+
3876
+ /**
3877
+ * Creates a new type hierarchy item.
3878
+ *
3879
+ * @param kind The kind of the item.
3880
+ * @param name The name of the item.
3881
+ * @param detail The details of the item.
3882
+ * @param uri The Uri of the item.
3883
+ * @param range The whole range of the item.
3884
+ * @param selectionRange The selection range of the item.
3885
+ */
3886
+ constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range$1, selectionRange: Range$1);
3887
+ }
3888
+
3889
+ /**
3890
+ * The type hierarchy provider interface describes the contract between extensions
3891
+ * and the type hierarchy feature.
3892
+ */
3893
+ interface TypeHierarchyProvider {
3894
+
3895
+ /**
3896
+ * Bootstraps type hierarchy by returning the item that is denoted by the given document
3897
+ * and position. This item will be used as entry into the type graph. Providers should
3898
+ * return `undefined` or `null` when there is no item at the given location.
3899
+ *
3900
+ * @param document The document in which the command was invoked.
3901
+ * @param position The position at which the command was invoked.
3902
+ * @param token A cancellation token.
3903
+ * @returns One or multiple type hierarchy items or a thenable that resolves to such. The lack of a result can be
3904
+ * signaled by returning `undefined`, `null`, or an empty array.
3905
+ */
3906
+ prepareTypeHierarchy(document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<TypeHierarchyItem | TypeHierarchyItem[]>;
3907
+
3908
+ /**
3909
+ * Provide all supertypes for an item, e.g all types from which a type is derived/inherited. In graph terms this describes directed
3910
+ * and annotated edges inside the type graph, e.g the given item is the starting node and the result is the nodes
3911
+ * that can be reached.
3912
+ *
3913
+ * @param item The hierarchy item for which super types should be computed.
3914
+ * @param token A cancellation token.
3915
+ * @returns A set of direct supertypes or a thenable that resolves to such. The lack of a result can be
3916
+ * signaled by returning `undefined` or `null`.
3917
+ */
3918
+ provideTypeHierarchySupertypes(item: TypeHierarchyItem, token: CancellationToken$1): ProviderResult<TypeHierarchyItem[]>;
3919
+
3920
+ /**
3921
+ * Provide all subtypes for an item, e.g all types which are derived/inherited from the given item. In
3922
+ * graph terms this describes directed and annotated edges inside the type graph, e.g the given item is the starting
3923
+ * node and the result is the nodes that can be reached.
3924
+ *
3925
+ * @param item The hierarchy item for which subtypes should be computed.
3926
+ * @param token A cancellation token.
3927
+ * @returns A set of direct subtypes or a thenable that resolves to such. The lack of a result can be
3928
+ * signaled by returning `undefined` or `null`.
3929
+ */
3930
+ provideTypeHierarchySubtypes(item: TypeHierarchyItem, token: CancellationToken$1): ProviderResult<TypeHierarchyItem[]>;
3931
+ }
3932
+
3933
+ /**
3934
+ * Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.
3935
+ */
3936
+ declare class LinkedEditingRanges {
3937
+ /**
3938
+ * Create a new linked editing ranges object.
3939
+ *
3940
+ * @param ranges A list of ranges that can be edited together
3941
+ * @param wordPattern An optional word pattern that describes valid contents for the given ranges
3942
+ */
3943
+ constructor(ranges: Range$1[], wordPattern?: RegExp);
3944
+
3945
+ /**
3946
+ * A list of ranges that can be edited together. The ranges must have
3947
+ * identical length and text content. The ranges cannot overlap.
3948
+ */
3949
+ readonly ranges: Range$1[];
3950
+
3951
+ /**
3952
+ * An optional word pattern that describes valid contents for the given ranges.
3953
+ * If no pattern is provided, the language configuration's word pattern will be used.
3954
+ */
3955
+ readonly wordPattern: RegExp | undefined;
3956
+ }
3957
+
3958
+ /**
3959
+ * The linked editing range provider interface defines the contract between extensions and
3960
+ * the linked editing feature.
3961
+ */
3962
+ interface LinkedEditingRangeProvider {
3963
+ /**
3964
+ * For a given position in a document, returns the range of the symbol at the position and all ranges
3965
+ * that have the same content. A change to one of the ranges can be applied to all other ranges if the new content
3966
+ * is valid. An optional word pattern can be returned with the result to describe valid contents.
3967
+ * If no result-specific word pattern is provided, the word pattern from the language configuration is used.
3968
+ *
3969
+ * @param document The document in which the provider was invoked.
3970
+ * @param position The position at which the provider was invoked.
3971
+ * @param token A cancellation token.
3972
+ * @return A list of ranges that can be edited together
3973
+ */
3974
+ provideLinkedEditingRanges(document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<LinkedEditingRanges>;
3975
+ }
3976
+
3977
+ /**
3978
+ * The configuration target
3979
+ */
3980
+ enum ConfigurationTarget {
3981
+ /**
3982
+ * Global configuration
3983
+ */
3984
+ Global = 1,
3985
+
3986
+ /**
3987
+ * Workspace configuration
3988
+ */
3989
+ Workspace = 2,
3990
+
3991
+ /**
3992
+ * Workspace folder configuration
3993
+ */
3994
+ WorkspaceFolder = 3
3511
3995
  }
3512
3996
 
3513
3997
  /**
@@ -4011,7 +4495,7 @@ enum ViewColumn {
4011
4495
  * To get an instance of an `OutputChannel` use
4012
4496
  * {@link window.createOutputChannel createOutputChannel}.
4013
4497
  */
4014
- interface OutputChannel$1 {
4498
+ interface OutputChannel {
4015
4499
 
4016
4500
  /**
4017
4501
  * The human-readable name of this output channel.
@@ -5246,7 +5730,7 @@ interface TextDocumentWillSaveEvent {
5246
5730
  *
5247
5731
  * @param thenable A thenable that resolves to {@link TextEdit pre-save-edits}.
5248
5732
  */
5249
- waitUntil(thenable: Thenable$1<TextEdit$1[]>): void;
5733
+ waitUntil(thenable: Thenable$1<readonly TextEdit$1[]>): void;
5250
5734
 
5251
5735
  /**
5252
5736
  * Allows to pause the event loop until the provided thenable resolved.
@@ -5652,11 +6136,21 @@ declare namespace workspace {
5652
6136
  * By default, all opened {@link workspace.workspaceFolders workspace folders} will be watched
5653
6137
  * for file changes recursively.
5654
6138
  *
5655
- * Additional folders can be added for file watching by providing a {@link RelativePattern} with
5656
- * a `base` that is outside of any of the currently opened workspace folders. If the `pattern` is
5657
- * complex (e.g. contains `**` or path segments), the folder will be watched recursively and
5658
- * otherwise will be watched non-recursively (i.e. only changes to the first level of the path
5659
- * will be reported).
6139
+ * Additional paths can be added for file watching by providing a {@link RelativePattern} with
6140
+ * a `base` path to watch. If the `pattern` is complex (e.g. contains `**` or path segments),
6141
+ * the path will be watched recursively and otherwise will be watched non-recursively (i.e. only
6142
+ * changes to the first level of the path will be reported).
6143
+ *
6144
+ * *Note* that requests for recursive file watchers for a `base` path that is inside the opened
6145
+ * workspace are ignored given all opened {@link workspace.workspaceFolders workspace folders} are
6146
+ * watched for file changes recursively by default. Non-recursive file watchers however are always
6147
+ * supported, even inside the opened workspace because they allow to bypass the configured settings
6148
+ * for excludes (`files.watcherExclude`). If you need to watch in a location that is typically
6149
+ * excluded (for example `node_modules` or `.git` folder), then you can use a non-recursive watcher
6150
+ * in the workspace for this purpose.
6151
+ *
6152
+ * If possible, keep the use of recursive watchers to a minimum because recursive file watching
6153
+ * is quite resource intense.
5660
6154
  *
5661
6155
  * Providing a `string` as `globPattern` acts as convenience method for watching file events in
5662
6156
  * all opened workspace folders. It cannot be used to add more folders for file watching, nor will
@@ -5666,10 +6160,11 @@ declare namespace workspace {
5666
6160
  *
5667
6161
  * To stop listening to events the watcher must be disposed.
5668
6162
  *
5669
- * *Note* that file events from file watchers may be excluded based on user configuration.
6163
+ * *Note* that file events from recursive file watchers may be excluded based on user configuration.
5670
6164
  * The setting `files.watcherExclude` helps to reduce the overhead of file events from folders
5671
6165
  * that are known to produce many file changes at once (such as `node_modules` folders). As such,
5672
- * it is highly recommended to watch with simple patterns that do not require recursive watchers.
6166
+ * it is highly recommended to watch with simple patterns that do not require recursive watchers
6167
+ * where the exclude settings are ignored and you have full control over the events.
5673
6168
  *
5674
6169
  * *Note* that symbolic links are not automatically followed for file watching unless the path to
5675
6170
  * watch itself is a symbolic link.
@@ -5726,7 +6221,7 @@ declare namespace workspace {
5726
6221
  * vscode.workspace.createFileSystemWatcher('**​/*.js'));
5727
6222
  * ```
5728
6223
  *
5729
- * *Note:* the array of workspace folders can be empy if no workspace is opened (empty window).
6224
+ * *Note:* the array of workspace folders can be empty if no workspace is opened (empty window).
5730
6225
  *
5731
6226
  * #### Out of workspace file watching
5732
6227
  *
@@ -5925,7 +6420,7 @@ declare namespace workspace {
5925
6420
  * {@linkcode notebook.onDidCloseNotebookDocument onDidCloseNotebookDocument}-event can occur at any time after.
5926
6421
  *
5927
6422
  * *Note* that opening a notebook does not show a notebook editor. This function only returns a notebook document which
5928
- * can be showns in a notebook editor but it can also be used for other things.
6423
+ * can be shown in a notebook editor but it can also be used for other things.
5929
6424
  *
5930
6425
  * @param uri The resource to open.
5931
6426
  * @returns A promise that resolves to a {@link NotebookDocument notebook}
@@ -5943,6 +6438,16 @@ declare namespace workspace {
5943
6438
  */
5944
6439
  export function openNotebookDocument(notebookType: string, content?: NotebookData): Thenable$1<NotebookDocument>;
5945
6440
 
6441
+ /**
6442
+ * An event that is emitted when a {@link NotebookDocument notebook} has changed.
6443
+ */
6444
+ export const onDidChangeNotebookDocument: Event$1<NotebookDocumentChangeEvent>;
6445
+
6446
+ /**
6447
+ * An event that is emitted when a {@link NotebookDocument notebook} is saved.
6448
+ */
6449
+ export const onDidSaveNotebookDocument: Event$1<NotebookDocument>;
6450
+
5946
6451
  /**
5947
6452
  * Register a {@link NotebookSerializer notebook serializer}.
5948
6453
  *
@@ -5950,7 +6455,7 @@ declare namespace workspace {
5950
6455
  * the `onNotebook:<notebookType>` activation event, and extensions must register their serializer in return.
5951
6456
  *
5952
6457
  * @param notebookType A notebook.
5953
- * @param serializer A notebook serialzier.
6458
+ * @param serializer A notebook serializer.
5954
6459
  * @param options Optional context options that define what parts of a notebook should be persisted
5955
6460
  * @return A {@link Disposable} that unregisters this serializer when being disposed.
5956
6461
  */
@@ -6262,6 +6767,94 @@ interface NotebookDocument {
6262
6767
  save(): Thenable$1<boolean>;
6263
6768
  }
6264
6769
 
6770
+ /**
6771
+ * Describes a change to a notebook cell.
6772
+ *
6773
+ * @see {@link NotebookDocumentChangeEvent}
6774
+ */
6775
+ interface NotebookDocumentCellChange {
6776
+
6777
+ /**
6778
+ * The affected notebook.
6779
+ */
6780
+ readonly cell: NotebookCell;
6781
+
6782
+ /**
6783
+ * The document of the cell or `undefined` when it did not change.
6784
+ *
6785
+ * *Note* that you should use the {@link workspace.onDidChangeTextDocument onDidChangeTextDocument}-event
6786
+ * for detailed change information, like what edits have been performed.
6787
+ */
6788
+ readonly document: TextDocument$1 | undefined;
6789
+
6790
+ /**
6791
+ * The new metadata of the cell or `undefined` when it did not change.
6792
+ */
6793
+ readonly metadata: { [key: string]: any } | undefined;
6794
+
6795
+ /**
6796
+ * The new outputs of the cell or `undefined` when they did not change.
6797
+ */
6798
+ readonly outputs: readonly NotebookCellOutput[] | undefined;
6799
+
6800
+ /**
6801
+ * The new execution summary of the cell or `undefined` when it did not change.
6802
+ */
6803
+ readonly executionSummary: NotebookCellExecutionSummary | undefined;
6804
+ }
6805
+
6806
+ /**
6807
+ * Describes a structural change to a notebook document, e.g newly added and removed cells.
6808
+ *
6809
+ * @see {@link NotebookDocumentChangeEvent}
6810
+ */
6811
+ interface NotebookDocumentContentChange {
6812
+
6813
+ /**
6814
+ * The range at which cells have been either added or removed.
6815
+ *
6816
+ * Note that no cells have been {@link NotebookDocumentContentChange.removedCells removed}
6817
+ * when this range is {@link NotebookRange.isEmpty empty}.
6818
+ */
6819
+ readonly range: NotebookRange;
6820
+
6821
+ /**
6822
+ * Cells that have been added to the document.
6823
+ */
6824
+ readonly addedCells: readonly NotebookCell[];
6825
+
6826
+ /**
6827
+ * Cells that have been removed from the document.
6828
+ */
6829
+ readonly removedCells: readonly NotebookCell[];
6830
+ }
6831
+
6832
+ /**
6833
+ * An event describing a transactional {@link NotebookDocument notebook} change.
6834
+ */
6835
+ interface NotebookDocumentChangeEvent {
6836
+
6837
+ /**
6838
+ * The affected notebook.
6839
+ */
6840
+ readonly notebook: NotebookDocument;
6841
+
6842
+ /**
6843
+ * The new metadata of the notebook or `undefined` when it did not change.
6844
+ */
6845
+ readonly metadata: { [key: string]: any } | undefined;
6846
+
6847
+ /**
6848
+ * An array of content changes describing added or removed {@link NotebookCell cells}.
6849
+ */
6850
+ readonly contentChanges: readonly NotebookDocumentContentChange[];
6851
+
6852
+ /**
6853
+ * An array of {@link NotebookDocumentCellChange cell changes}.
6854
+ */
6855
+ readonly cellChanges: readonly NotebookDocumentCellChange[];
6856
+ }
6857
+
6265
6858
  /**
6266
6859
  * The summary of a notebook cell execution.
6267
6860
  */
@@ -6772,118 +7365,6 @@ declare namespace TextDocument {
6772
7365
  function applyEdits(document: TextDocument, edits: TextEdit[]): string;
6773
7366
  }
6774
7367
 
6775
- /**
6776
- * A language server message
6777
- */
6778
- interface Message {
6779
- jsonrpc: string;
6780
- }
6781
- interface ResponseErrorLiteral<D> {
6782
- /**
6783
- * A number indicating the error type that occured.
6784
- */
6785
- code: number;
6786
- /**
6787
- * A string providing a short decription of the error.
6788
- */
6789
- message: string;
6790
- /**
6791
- * A Primitive or Structured value that contains additional
6792
- * information about the error. Can be omitted.
6793
- */
6794
- data?: D;
6795
- }
6796
- /**
6797
- * An error object return in a response in case a request
6798
- * has failed.
6799
- */
6800
- declare class ResponseError<D> extends Error {
6801
- readonly code: number;
6802
- readonly data: D | undefined;
6803
- constructor(code: number, message: string, data?: D);
6804
- toJson(): ResponseErrorLiteral<D>;
6805
- }
6806
- declare class ParameterStructures {
6807
- private readonly kind;
6808
- /**
6809
- * The parameter structure is automatically inferred on the number of parameters
6810
- * and the parameter type in case of a single param.
6811
- */
6812
- static readonly auto: ParameterStructures;
6813
- /**
6814
- * Forces `byPosition` parameter structure. This is useful if you have a single
6815
- * parameter which has a literal type.
6816
- */
6817
- static readonly byPosition: ParameterStructures;
6818
- /**
6819
- * Forces `byName` parameter structure. This is only useful when having a single
6820
- * parameter. The library will report errors if used with a different number of
6821
- * parameters.
6822
- */
6823
- static readonly byName: ParameterStructures;
6824
- private constructor();
6825
- static is(value: any): value is ParameterStructures;
6826
- toString(): string;
6827
- }
6828
- /**
6829
- * An interface to type messages.
6830
- */
6831
- interface MessageSignature {
6832
- readonly method: string;
6833
- readonly numberOfParams: number;
6834
- readonly parameterStructures: ParameterStructures;
6835
- }
6836
- /**
6837
- * An abstract implementation of a MessageType.
6838
- */
6839
- declare abstract class AbstractMessageSignature implements MessageSignature {
6840
- readonly method: string;
6841
- readonly numberOfParams: number;
6842
- constructor(method: string, numberOfParams: number);
6843
- get parameterStructures(): ParameterStructures;
6844
- }
6845
- /**
6846
- * End marker interface for request and notification types.
6847
- */
6848
- interface _EM {
6849
- _$endMarker$_: number;
6850
- }
6851
- /**
6852
- * Classes to type request response pairs
6853
- */
6854
- declare class RequestType0<R, E> extends AbstractMessageSignature {
6855
- /**
6856
- * Clients must not use this property. It is here to ensure correct typing.
6857
- */
6858
- readonly _: [R, E, _EM] | undefined;
6859
- constructor(method: string);
6860
- }
6861
- declare class RequestType<P, R, E> extends AbstractMessageSignature {
6862
- private _parameterStructures;
6863
- /**
6864
- * Clients must not use this property. It is here to ensure correct typing.
6865
- */
6866
- readonly _: [P, R, E, _EM] | undefined;
6867
- constructor(method: string, _parameterStructures?: ParameterStructures);
6868
- get parameterStructures(): ParameterStructures;
6869
- }
6870
- declare class NotificationType<P> extends AbstractMessageSignature {
6871
- private _parameterStructures;
6872
- /**
6873
- * Clients must not use this property. It is here to ensure correct typing.
6874
- */
6875
- readonly _: [P, _EM] | undefined;
6876
- constructor(method: string, _parameterStructures?: ParameterStructures);
6877
- get parameterStructures(): ParameterStructures;
6878
- }
6879
- declare class NotificationType0 extends AbstractMessageSignature {
6880
- /**
6881
- * Clients must not use this property. It is here to ensure correct typing.
6882
- */
6883
- readonly _: [_EM] | undefined;
6884
- constructor(method: string);
6885
- }
6886
-
6887
7368
  interface Disposable {
6888
7369
  /**
6889
7370
  * Dispose this object.
@@ -6900,9 +7381,9 @@ declare namespace Disposable {
6900
7381
  interface Event<T> {
6901
7382
  /**
6902
7383
  *
6903
- * @param listener The listener function will be call when the event happens.
7384
+ * @param listener The listener function will be called when the event happens.
6904
7385
  * @param thisArgs The 'this' which will be used when calling the event listener.
6905
- * @param disposables An array to which a {{IDisposable}} will be added. The
7386
+ * @param disposables An array to which a {{IDisposable}} will be added.
6906
7387
  * @return
6907
7388
  */
6908
7389
  (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable;
@@ -6954,296 +7435,71 @@ declare namespace CancellationToken {
6954
7435
  function is(value: any): value is CancellationToken;
6955
7436
  }
6956
7437
 
6957
- declare class ProgressType<PR> {
6958
- /**
6959
- * Clients must not use these properties. They are here to ensure correct typing.
6960
- * in TypeScript
6961
- */
6962
- readonly __?: [PR, _EM];
6963
- readonly _pr?: PR;
6964
- constructor();
6965
- }
6966
- declare type HandlerResult<R, E> = R | ResponseError<E> | Thenable<R> | Thenable<ResponseError<E>> | Thenable<R | ResponseError<E>>;
6967
- interface GenericRequestHandler<R, E> {
6968
- (...params: any[]): HandlerResult<R, E>;
6969
- }
6970
- interface RequestHandler0<R, E> {
6971
- (token: CancellationToken): HandlerResult<R, E>;
6972
- }
6973
- interface RequestHandler<P, R, E> {
6974
- (params: P, token: CancellationToken): HandlerResult<R, E>;
6975
- }
6976
- interface GenericNotificationHandler {
6977
- (...params: any[]): void;
6978
- }
6979
- interface NotificationHandler0 {
6980
- (): void;
6981
- }
6982
- interface NotificationHandler<P> {
6983
- (params: P): void;
6984
- }
6985
- declare type TraceValues = 'off' | 'messages' | 'verbose';
6986
- declare enum Trace {
6987
- Off = 0,
6988
- Messages = 1,
6989
- Verbose = 2
6990
- }
6991
- declare namespace Trace {
6992
- function fromString(value: string): Trace;
6993
- function toString(value: Trace): TraceValues;
6994
- }
6995
- interface Tracer {
6996
- log(dataObject: any): void;
6997
- log(message: string, data?: string): void;
6998
- }
6999
-
7000
- interface OutputChannel extends Disposable {
7001
- append(value: string): void;
7002
- appendLine(line: string): void;
7003
- show(preserveFocus?: boolean): void;
7004
- }
7005
-
7006
- interface IConnection {
7007
- listen(): void;
7008
- sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken): Thenable<R>;
7009
- sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Thenable<R>;
7010
- sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>;
7011
- sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>;
7012
- sendRequest<R>(type: string | MessageSignature, ...params: any[]): Thenable<R>;
7013
- onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable;
7014
- onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable;
7015
- onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable;
7016
- onRequest<R, E>(method: string | MessageSignature, handler: GenericRequestHandler<R, E>): Disposable;
7017
- sendNotification(type: NotificationType0): Thenable<void>;
7018
- sendNotification<P>(type: NotificationType<P>, params?: P): Thenable<void>;
7019
- sendNotification(method: string): Thenable<void>;
7020
- sendNotification(method: string, params: any): Thenable<void>;
7021
- sendNotification(method: string | MessageSignature, params?: any): Thenable<void>;
7022
- onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable;
7023
- onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable;
7024
- onNotification(method: string, handler: GenericNotificationHandler): Disposable;
7025
- onNotification(method: string | MessageSignature, handler: GenericNotificationHandler): Disposable;
7026
- onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable;
7027
- sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Thenable<void>;
7028
- trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;
7029
- initialize(params: InitializeParams): Thenable<InitializeResult>;
7030
- shutdown(): Thenable<void>;
7031
- exit(): Thenable<void>;
7032
- onLogMessage(handle: NotificationHandler<LogMessageParams>): void;
7033
- onShowMessage(handler: NotificationHandler<ShowMessageParams>): void;
7034
- onTelemetry(handler: NotificationHandler<any>): void;
7035
- didChangeConfiguration(params: DidChangeConfigurationParams): Thenable<void>;
7036
- didChangeWatchedFiles(params: DidChangeWatchedFilesParams): Thenable<void>;
7037
- didOpenTextDocument(params: DidOpenTextDocumentParams): Thenable<void>;
7038
- didChangeTextDocument(params: DidChangeTextDocumentParams): Thenable<void>;
7039
- didCloseTextDocument(params: DidCloseTextDocumentParams): Thenable<void>;
7040
- didSaveTextDocument(params: DidSaveTextDocumentParams): Thenable<void>;
7041
- onDiagnostics(handler: NotificationHandler<PublishDiagnosticsParams>): void;
7042
- end(): void;
7043
- dispose(): void;
7044
- }
7045
- interface ConnectionErrorHandler {
7046
- (error: Error, message: Message | undefined, count: number | undefined): void;
7047
- }
7048
- interface ConnectionCloseHandler {
7049
- (): void;
7050
- }
7051
- interface IConnectionProvider {
7052
- get(errorHandler: ConnectionErrorHandler, closeHandler: ConnectionCloseHandler, outputChannel: OutputChannel | undefined): Thenable<IConnection>;
7438
+ interface FileFormattingOptions {
7439
+ trimTrailingWhitespace?: boolean;
7440
+ trimFinalNewlines?: boolean;
7441
+ insertFinalNewline?: boolean;
7053
7442
  }
7054
-
7055
- interface ProvideDocumentColorsSignature {
7056
- (document: TextDocument$1, token: CancellationToken$2): ProviderResult<ColorInformation[]>;
7057
- }
7058
- interface ProvideColorPresentationSignature {
7059
- (color: Color, context: {
7060
- document: TextDocument$1;
7061
- range: Range$1;
7062
- }, token: CancellationToken$2): ProviderResult<ColorPresentation[]>;
7063
- }
7064
- interface ColorProviderMiddleware {
7065
- provideDocumentColors?: (this: void, document: TextDocument$1, token: CancellationToken$2, next: ProvideDocumentColorsSignature) => ProviderResult<ColorInformation[]>;
7066
- provideColorPresentations?: (this: void, color: Color, context: {
7067
- document: TextDocument$1;
7068
- range: Range$1;
7069
- }, token: CancellationToken$2, next: ProvideColorPresentationSignature) => ProviderResult<ColorPresentation[]>;
7070
- }
7071
-
7072
- interface ProvideImplementationSignature {
7073
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Definition | DefinitionLink[]>;
7074
- }
7075
- interface ImplementationMiddleware {
7076
- provideImplementation?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideImplementationSignature) => ProviderResult<Definition | DefinitionLink[]>;
7077
- }
7078
-
7079
- interface ProvideTypeDefinitionSignature {
7080
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Definition | DefinitionLink[]>;
7081
- }
7082
- interface TypeDefinitionMiddleware {
7083
- provideTypeDefinition?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideTypeDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
7084
- }
7085
-
7086
- interface ConfigurationWorkspaceMiddleware {
7087
- configuration?: ConfigurationRequest.MiddlewareSignature;
7088
- }
7089
-
7090
- interface WorkspaceFolderWorkspaceMiddleware {
7091
- workspaceFolders?: WorkspaceFoldersRequest.MiddlewareSignature;
7092
- didChangeWorkspaceFolders?: NextSignature<WorkspaceFoldersChangeEvent, void>;
7093
- }
7094
-
7095
- interface ProvideFoldingRangeSignature {
7096
- (this: void, document: TextDocument$1, context: FoldingContext, token: CancellationToken$2): ProviderResult<FoldingRange[]>;
7097
- }
7098
- interface FoldingRangeProviderMiddleware {
7099
- provideFoldingRanges?: (this: void, document: TextDocument$1, context: FoldingContext, token: CancellationToken$2, next: ProvideFoldingRangeSignature) => ProviderResult<FoldingRange[]>;
7100
- }
7101
-
7102
- interface ProvideDeclarationSignature {
7103
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Declaration>;
7104
- }
7105
- interface DeclarationMiddleware {
7106
- provideDeclaration?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideDeclarationSignature) => ProviderResult<Declaration>;
7107
- }
7108
-
7109
- interface ProvideSelectionRangeSignature {
7110
- (this: void, document: TextDocument$1, positions: Position$1[], token: CancellationToken$2): ProviderResult<SelectionRange[]>;
7111
- }
7112
- interface SelectionRangeProviderMiddleware {
7113
- provideSelectionRanges?: (this: void, document: TextDocument$1, positions: Position$1[], token: CancellationToken$2, next: ProvideSelectionRangeSignature) => ProviderResult<SelectionRange[]>;
7114
- }
7115
-
7116
- interface PrepareCallHierarchySignature {
7117
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
7118
- }
7119
- interface CallHierarchyIncomingCallsSignature {
7120
- (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyIncomingCall[]>;
7121
- }
7122
- interface CallHierarchyOutgoingCallsSignature {
7123
- (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyOutgoingCall[]>;
7124
- }
7125
- /**
7126
- * Call hierarchy middleware
7127
- *
7128
- * @since 3.16.0
7129
- */
7130
- interface CallHierarchyMiddleware {
7131
- prepareCallHierarchy?: (this: void, document: TextDocument$1, positions: Position$1, token: CancellationToken$1, next: PrepareCallHierarchySignature) => ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
7132
- provideCallHierarchyIncomingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyIncomingCallsSignature) => ProviderResult<CallHierarchyIncomingCall[]>;
7133
- provideCallHierarchyOutgoingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyOutgoingCallsSignature) => ProviderResult<CallHierarchyOutgoingCall[]>;
7134
- }
7135
-
7136
- interface DocumentSemanticsTokensSignature {
7137
- (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<SemanticTokens>;
7138
- }
7139
- interface DocumentSemanticsTokensEditsSignature {
7140
- (this: void, document: TextDocument$1, previousResultId: string, token: CancellationToken$1): ProviderResult<SemanticTokensEdits | SemanticTokens>;
7141
- }
7142
- interface DocumentRangeSemanticTokensSignature {
7143
- (this: void, document: TextDocument$1, range: Range$1, token: CancellationToken$1): ProviderResult<SemanticTokens>;
7144
- }
7145
- /**
7146
- * The semantic token middleware
7147
- *
7148
- * @since 3.16.0
7149
- */
7150
- interface SemanticTokensMiddleware {
7151
- provideDocumentSemanticTokens?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: DocumentSemanticsTokensSignature) => ProviderResult<SemanticTokens>;
7152
- provideDocumentSemanticTokensEdits?: (this: void, document: TextDocument$1, previousResultId: string, token: CancellationToken$1, next: DocumentSemanticsTokensEditsSignature) => ProviderResult<SemanticTokensEdits | SemanticTokens>;
7153
- provideDocumentRangeSemanticTokens?: (this: void, document: TextDocument$1, range: Range$1, token: CancellationToken$1, next: DocumentRangeSemanticTokensSignature) => ProviderResult<SemanticTokens>;
7154
- }
7155
- interface SemanticTokensProviders {
7156
- range?: DocumentRangeSemanticTokensProvider;
7157
- full?: DocumentSemanticTokensProvider;
7158
- onDidChangeSemanticTokensEmitter: EventEmitter<void>;
7159
- }
7160
-
7161
- /**
7162
- * File operation middleware
7163
- *
7164
- * @since 3.16.0
7165
- */
7166
- interface FileOperationsMiddleware {
7167
- didCreateFiles?: NextSignature<FileCreateEvent, void>;
7168
- willCreateFiles?: NextSignature<FileCreateEvent, Thenable<WorkspaceEdit | null | undefined>>;
7169
- didRenameFiles?: NextSignature<FileRenameEvent, void>;
7170
- willRenameFiles?: NextSignature<FileRenameEvent, Thenable<WorkspaceEdit | null | undefined>>;
7171
- didDeleteFiles?: NextSignature<FileDeleteEvent, void>;
7172
- willDeleteFiles?: NextSignature<FileDeleteEvent, Thenable<WorkspaceEdit | null | undefined>>;
7173
- }
7174
-
7175
- interface ProvideLinkedEditingRangeSignature {
7176
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<LinkedEditingRanges>;
7177
- }
7178
- /**
7179
- * Linked editing middleware
7180
- *
7181
- * @since 3.16.0
7182
- */
7183
- interface LinkedEditingRangeMiddleware {
7184
- provideLinkedEditingRange?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideLinkedEditingRangeSignature) => ProviderResult<LinkedEditingRanges>;
7185
- }
7186
-
7187
- interface FileFormattingOptions {
7188
- trimTrailingWhitespace?: boolean;
7189
- trimFinalNewlines?: boolean;
7190
- insertFinalNewline?: boolean;
7191
- }
7192
- interface Converter$1 {
7193
- asUri(uri: Uri): string;
7194
- asTextDocumentIdentifier(textDocument: TextDocument$1): ls.TextDocumentIdentifier;
7195
- asVersionedTextDocumentIdentifier(textDocument: TextDocument$1): ls.VersionedTextDocumentIdentifier;
7196
- asOpenTextDocumentParams(textDocument: TextDocument$1): ls.DidOpenTextDocumentParams;
7197
- asChangeTextDocumentParams(textDocument: TextDocument$1): ls.DidChangeTextDocumentParams;
7198
- asChangeTextDocumentParams(event: TextDocumentChangeEvent): ls.DidChangeTextDocumentParams;
7199
- asCloseTextDocumentParams(textDocument: TextDocument$1): ls.DidCloseTextDocumentParams;
7200
- asSaveTextDocumentParams(textDocument: TextDocument$1, includeContent?: boolean): ls.DidSaveTextDocumentParams;
7201
- asWillSaveTextDocumentParams(event: TextDocumentWillSaveEvent): ls.WillSaveTextDocumentParams;
7202
- asDidCreateFilesParams(event: FileCreateEvent): CreateFilesParams;
7203
- asDidRenameFilesParams(event: FileRenameEvent): RenameFilesParams;
7204
- asDidDeleteFilesParams(event: FileDeleteEvent): DeleteFilesParams;
7205
- asWillCreateFilesParams(event: FileCreateEvent): CreateFilesParams;
7206
- asWillRenameFilesParams(event: FileRenameEvent): RenameFilesParams;
7207
- asWillDeleteFilesParams(event: FileDeleteEvent): DeleteFilesParams;
7208
- asTextDocumentPositionParams(textDocument: TextDocument$1, position: Position$1): ls.TextDocumentPositionParams;
7209
- asCompletionParams(textDocument: TextDocument$1, position: Position$1, context: CompletionContext): ls.CompletionParams;
7210
- asSignatureHelpParams(textDocument: TextDocument$1, position: Position$1, context: SignatureHelpContext): ls.SignatureHelpParams;
7211
- asWorkerPosition(position: Position$1): ls.Position;
7212
- asPosition(value: Position$1): ls.Position;
7213
- asPosition(value: undefined): undefined;
7214
- asPosition(value: null): null;
7215
- asPosition(value: Position$1 | undefined | null): ls.Position | undefined | null;
7216
- asPositions(value: Position$1[]): ls.Position[];
7217
- asRange(value: Range$1): ls.Range;
7218
- asRange(value: undefined): undefined;
7219
- asRange(value: null): null;
7220
- asRange(value: Range$1 | undefined | null): ls.Range | undefined | null;
7221
- asLocation(value: Location): ls.Location;
7222
- asLocation(value: undefined): undefined;
7223
- asLocation(value: null): null;
7224
- asLocation(value: Location | undefined | null): ls.Location | undefined | null;
7225
- asDiagnosticSeverity(value: DiagnosticSeverity): number;
7226
- asDiagnosticTag(value: DiagnosticTag): number | undefined;
7227
- asDiagnostic(item: Diagnostic): ls.Diagnostic;
7228
- asDiagnostics(items: Diagnostic[]): ls.Diagnostic[];
7229
- asCompletionItem(item: CompletionItem): ls.CompletionItem;
7230
- asSymbolKind(item: SymbolKind): ls.SymbolKind;
7231
- asSymbolTag(item: SymbolTag): ls.SymbolTag;
7232
- asSymbolTags(items: ReadonlyArray<SymbolTag>): ls.SymbolTag[];
7233
- asTextEdit(edit: TextEdit$1): ls.TextEdit;
7234
- asReferenceParams(textDocument: TextDocument$1, position: Position$1, options: {
7235
- includeDeclaration: boolean;
7236
- }): ls.ReferenceParams;
7237
- asCodeAction(item: CodeAction$1): ls.CodeAction;
7238
- asCodeActionContext(context: CodeActionContext): ls.CodeActionContext;
7239
- asCommand(item: Command): ls.Command;
7240
- asCodeLens(item: CodeLens): ls.CodeLens;
7241
- asFormattingOptions(options: FormattingOptions, fileOptions: FileFormattingOptions): ls.FormattingOptions;
7242
- asDocumentSymbolParams(textDocument: TextDocument$1): ls.DocumentSymbolParams;
7243
- asCodeLensParams(textDocument: TextDocument$1): ls.CodeLensParams;
7244
- asDocumentLink(item: DocumentLink): ls.DocumentLink;
7245
- asDocumentLinkParams(textDocument: TextDocument$1): ls.DocumentLinkParams;
7246
- asCallHierarchyItem(value: CallHierarchyItem): ls.CallHierarchyItem;
7443
+ interface Converter$1 {
7444
+ asUri(uri: Uri): string;
7445
+ asTextDocumentItem(textDocument: TextDocument$1): ls.TextDocumentItem;
7446
+ asTextDocumentIdentifier(textDocument: TextDocument$1): ls.TextDocumentIdentifier;
7447
+ asVersionedTextDocumentIdentifier(textDocument: TextDocument$1): ls.VersionedTextDocumentIdentifier;
7448
+ asOpenTextDocumentParams(textDocument: TextDocument$1): ls.DidOpenTextDocumentParams;
7449
+ asChangeTextDocumentParams(textDocument: TextDocument$1): ls.DidChangeTextDocumentParams;
7450
+ asChangeTextDocumentParams(event: TextDocumentChangeEvent): ls.DidChangeTextDocumentParams;
7451
+ asCloseTextDocumentParams(textDocument: TextDocument$1): ls.DidCloseTextDocumentParams;
7452
+ asSaveTextDocumentParams(textDocument: TextDocument$1, includeContent?: boolean): ls.DidSaveTextDocumentParams;
7453
+ asWillSaveTextDocumentParams(event: TextDocumentWillSaveEvent): ls.WillSaveTextDocumentParams;
7454
+ asDidCreateFilesParams(event: FileCreateEvent): ls.CreateFilesParams;
7455
+ asDidRenameFilesParams(event: FileRenameEvent): ls.RenameFilesParams;
7456
+ asDidDeleteFilesParams(event: FileDeleteEvent): ls.DeleteFilesParams;
7457
+ asWillCreateFilesParams(event: FileCreateEvent): ls.CreateFilesParams;
7458
+ asWillRenameFilesParams(event: FileRenameEvent): ls.RenameFilesParams;
7459
+ asWillDeleteFilesParams(event: FileDeleteEvent): ls.DeleteFilesParams;
7460
+ asTextDocumentPositionParams(textDocument: TextDocument$1, position: Position$1): ls.TextDocumentPositionParams;
7461
+ asCompletionParams(textDocument: TextDocument$1, position: Position$1, context: CompletionContext): ls.CompletionParams;
7462
+ asSignatureHelpParams(textDocument: TextDocument$1, position: Position$1, context: SignatureHelpContext): ls.SignatureHelpParams;
7463
+ asWorkerPosition(position: Position$1): ls.Position;
7464
+ asPosition(value: null): null;
7465
+ asPosition(value: undefined): undefined;
7466
+ asPosition(value: Position$1): ls.Position;
7467
+ asPosition(value: Position$1 | undefined | null): ls.Position | undefined | null;
7468
+ asPositions(value: readonly Position$1[], token?: CancellationToken$1): Promise<ls.Position[]>;
7469
+ asRange(value: null): null;
7470
+ asRange(value: undefined): undefined;
7471
+ asRange(value: Range$1): ls.Range;
7472
+ asRange(value: Range$1 | undefined | null): ls.Range | undefined | null;
7473
+ asLocation(value: null): null;
7474
+ asLocation(value: undefined): undefined;
7475
+ asLocation(value: Location): ls.Location;
7476
+ asLocation(value: Location | undefined | null): ls.Location | undefined | null;
7477
+ asDiagnosticSeverity(value: DiagnosticSeverity): number;
7478
+ asDiagnosticTag(value: DiagnosticTag): number | undefined;
7479
+ asDiagnostic(item: Diagnostic): ls.Diagnostic;
7480
+ asDiagnostics(items: Diagnostic[], token?: CancellationToken$1): Promise<ls.Diagnostic[]>;
7481
+ asCompletionItem(item: CompletionItem, labelDetailsSupport?: boolean): ls.CompletionItem;
7482
+ asSymbolKind(item: SymbolKind): ls.SymbolKind;
7483
+ asSymbolTag(item: SymbolTag): ls.SymbolTag;
7484
+ asSymbolTags(items: ReadonlyArray<SymbolTag>): ls.SymbolTag[];
7485
+ asTextEdit(edit: TextEdit$1): ls.TextEdit;
7486
+ asReferenceParams(textDocument: TextDocument$1, position: Position$1, options: {
7487
+ includeDeclaration: boolean;
7488
+ }): ls.ReferenceParams;
7489
+ asCodeAction(item: CodeAction, token?: CancellationToken$1): Promise<ls.CodeAction>;
7490
+ asCodeActionContext(context: CodeActionContext, token?: CancellationToken$1): Promise<ls.CodeActionContext>;
7491
+ asInlineValueContext(context: InlineValueContext): ls.InlineValueContext;
7492
+ asCommand(item: Command): ls.Command;
7493
+ asCodeLens(item: CodeLens): ls.CodeLens;
7494
+ asFormattingOptions(options: FormattingOptions, fileOptions: FileFormattingOptions): ls.FormattingOptions;
7495
+ asDocumentSymbolParams(textDocument: TextDocument$1): ls.DocumentSymbolParams;
7496
+ asCodeLensParams(textDocument: TextDocument$1): ls.CodeLensParams;
7497
+ asDocumentLink(item: DocumentLink): ls.DocumentLink;
7498
+ asDocumentLinkParams(textDocument: TextDocument$1): ls.DocumentLinkParams;
7499
+ asCallHierarchyItem(value: CallHierarchyItem): ls.CallHierarchyItem;
7500
+ asTypeHierarchyItem(value: TypeHierarchyItem): ls.TypeHierarchyItem;
7501
+ asWorkspaceSymbol(item: SymbolInformation): ls.WorkspaceSymbol;
7502
+ asInlayHint(value: InlayHint): ls.InlayHint;
7247
7503
  }
7248
7504
  interface URIConverter$1 {
7249
7505
  (value: Uri): string;
@@ -7256,220 +7512,778 @@ declare class ProtocolCompletionItem extends CompletionItem {
7256
7512
  originalItemKind: ls.CompletionItemKind | undefined;
7257
7513
  deprecated: boolean | undefined;
7258
7514
  insertTextMode: ls.InsertTextMode | undefined;
7259
- constructor(label: string);
7515
+ constructor(label: string | CompletionItemLabel);
7260
7516
  }
7261
7517
 
7262
7518
  interface Converter {
7263
7519
  asUri(value: string): Uri;
7264
- asDiagnostic(diagnostic: ls.Diagnostic): Diagnostic;
7265
- asDiagnostics(diagnostics: ls.Diagnostic[]): Diagnostic[];
7520
+ asDocumentSelector(value: ls.DocumentSelector): DocumentSelector;
7266
7521
  asPosition(value: undefined | null): undefined;
7267
7522
  asPosition(value: ls.Position): Position$1;
7268
7523
  asPosition(value: ls.Position | undefined | null): Position$1 | undefined;
7269
7524
  asRange(value: undefined | null): undefined;
7270
7525
  asRange(value: ls.Range): Range$1;
7271
7526
  asRange(value: ls.Range | undefined | null): Range$1 | undefined;
7272
- asRanges(values: ls.Range[]): Range$1[];
7527
+ asRanges(items: ReadonlyArray<ls.Range>, token?: CancellationToken$1): Promise<Range$1[]>;
7528
+ asDiagnostic(diagnostic: ls.Diagnostic): Diagnostic;
7529
+ asDiagnostics(diagnostics: ls.Diagnostic[], token?: CancellationToken$1): Promise<Diagnostic[]>;
7273
7530
  asDiagnosticSeverity(value: number | undefined | null): DiagnosticSeverity;
7274
7531
  asDiagnosticTag(tag: ls.DiagnosticTag): DiagnosticTag | undefined;
7275
- asHover(hover: ls.Hover): Hover;
7276
7532
  asHover(hover: undefined | null): undefined;
7533
+ asHover(hover: ls.Hover): Hover;
7277
7534
  asHover(hover: ls.Hover | undefined | null): Hover | undefined;
7278
- asCompletionResult(result: ls.CompletionList): CompletionList;
7279
- asCompletionResult(result: ls.CompletionItem[]): CompletionItem[];
7280
- asCompletionResult(result: undefined | null): undefined;
7281
- asCompletionResult(result: ls.CompletionItem[] | ls.CompletionList | undefined | null): CompletionItem[] | CompletionList | undefined;
7282
- asCompletionItem(item: ls.CompletionItem): ProtocolCompletionItem;
7535
+ asCompletionResult(value: undefined | null, allCommitCharacters?: string[], token?: CancellationToken$1): Promise<undefined>;
7536
+ asCompletionResult(value: ls.CompletionList, allCommitCharacters?: string[], token?: CancellationToken$1): Promise<CompletionList>;
7537
+ asCompletionResult(value: ls.CompletionItem[], allCommitCharacters?: string[], token?: CancellationToken$1): Promise<CompletionItem[]>;
7538
+ asCompletionResult(value: ls.CompletionItem[] | ls.CompletionList | undefined | null, allCommitCharacters?: string[], token?: CancellationToken$1): Promise<CompletionItem[] | CompletionList | undefined>;
7539
+ asCompletionItem(item: ls.CompletionItem, defaultCommitCharacters?: string[]): ProtocolCompletionItem;
7283
7540
  asTextEdit(edit: undefined | null): undefined;
7284
7541
  asTextEdit(edit: ls.TextEdit): TextEdit$1;
7285
7542
  asTextEdit(edit: ls.TextEdit | undefined | null): TextEdit$1 | undefined;
7286
- asTextEdits(items: ls.TextEdit[]): TextEdit$1[];
7287
- asTextEdits(items: undefined | null): undefined;
7288
- asTextEdits(items: ls.TextEdit[] | undefined | null): TextEdit$1[] | undefined;
7289
- asSignatureHelp(item: undefined | null): undefined;
7290
- asSignatureHelp(item: ls.SignatureHelp): SignatureHelp;
7291
- asSignatureHelp(item: ls.SignatureHelp | undefined | null): SignatureHelp | undefined;
7292
- asSignatureInformation(item: ls.SignatureInformation): SignatureInformation;
7293
- asSignatureInformations(items: ls.SignatureInformation[]): SignatureInformation[];
7543
+ asTextEdits(items: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7544
+ asTextEdits(items: ls.TextEdit[], token?: CancellationToken$1): Promise<TextEdit$1[]>;
7545
+ asTextEdits(items: ls.TextEdit[] | undefined | null, token?: CancellationToken$1): Promise<TextEdit$1[] | undefined>;
7546
+ asSignatureHelp(item: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7547
+ asSignatureHelp(item: ls.SignatureHelp, token?: CancellationToken$1): Promise<SignatureHelp>;
7548
+ asSignatureHelp(item: ls.SignatureHelp | undefined | null, token?: CancellationToken$1): Promise<SignatureHelp | undefined>;
7549
+ asSignatureInformation(item: ls.SignatureInformation, token?: CancellationToken$1): Promise<SignatureInformation>;
7550
+ asSignatureInformations(items: ls.SignatureInformation[], token?: CancellationToken$1): Promise<SignatureInformation[]>;
7294
7551
  asParameterInformation(item: ls.ParameterInformation): ParameterInformation;
7295
- asParameterInformations(item: ls.ParameterInformation[]): ParameterInformation[];
7552
+ asParameterInformations(item: ls.ParameterInformation[], token?: CancellationToken$1): Promise<ParameterInformation[]>;
7296
7553
  asLocation(item: ls.Location): Location;
7297
7554
  asLocation(item: undefined | null): undefined;
7298
7555
  asLocation(item: ls.Location | undefined | null): Location | undefined;
7299
- asDeclarationResult(item: ls.Declaration): Location | Location[];
7300
- asDeclarationResult(item: ls.DeclarationLink[]): LocationLink[];
7301
- asDeclarationResult(item: undefined | null): undefined;
7302
- asDeclarationResult(item: ls.Declaration | ls.DeclarationLink[] | undefined | null): Declaration | undefined;
7303
- asDefinitionResult(item: ls.Definition): Definition;
7304
- asDefinitionResult(item: ls.DefinitionLink[]): DefinitionLink[];
7305
- asDefinitionResult(item: undefined | null): undefined;
7306
- asDefinitionResult(item: ls.Definition | ls.DefinitionLink[] | undefined | null): Definition | DefinitionLink[] | undefined;
7307
- asReferences(values: ls.Location[]): Location[];
7308
- asReferences(values: undefined | null): Location[] | undefined;
7309
- asReferences(values: ls.Location[] | undefined | null): Location[] | undefined;
7556
+ asDeclarationResult(item: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7557
+ asDeclarationResult(item: ls.Declaration, token?: CancellationToken$1): Promise<Location | Location[]>;
7558
+ asDeclarationResult(item: ls.DeclarationLink[], token?: CancellationToken$1): Promise<LocationLink[]>;
7559
+ asDeclarationResult(item: ls.Declaration | ls.DeclarationLink[] | undefined | null, token?: CancellationToken$1): Promise<Declaration | undefined>;
7560
+ asDefinitionResult(item: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7561
+ asDefinitionResult(item: ls.Definition, token?: CancellationToken$1): Promise<Definition>;
7562
+ asDefinitionResult(item: ls.DefinitionLink[], token?: CancellationToken$1): Promise<DefinitionLink[]>;
7563
+ asDefinitionResult(item: ls.Definition | ls.DefinitionLink[] | undefined | null, token?: CancellationToken$1): Promise<Definition | DefinitionLink[] | undefined>;
7564
+ asReferences(values: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7565
+ asReferences(values: ls.Location[], token?: CancellationToken$1): Promise<Location[]>;
7566
+ asReferences(values: ls.Location[] | undefined | null, token?: CancellationToken$1): Promise<Location[] | undefined>;
7310
7567
  asDocumentHighlightKind(item: number): DocumentHighlightKind;
7311
7568
  asDocumentHighlight(item: ls.DocumentHighlight): DocumentHighlight;
7312
- asDocumentHighlights(values: ls.DocumentHighlight[]): DocumentHighlight[];
7313
- asDocumentHighlights(values: undefined | null): undefined;
7314
- asDocumentHighlights(values: ls.DocumentHighlight[] | undefined | null): DocumentHighlight[] | undefined;
7569
+ asDocumentHighlights(values: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7570
+ asDocumentHighlights(values: ls.DocumentHighlight[], token?: CancellationToken$1): Promise<DocumentHighlight[]>;
7571
+ asDocumentHighlights(values: ls.DocumentHighlight[] | undefined | null, token?: CancellationToken$1): Promise<DocumentHighlight[] | undefined>;
7315
7572
  asSymbolKind(item: ls.SymbolKind): SymbolKind;
7316
7573
  asSymbolTag(item: ls.SymbolTag): SymbolTag | undefined;
7317
7574
  asSymbolTags(items: undefined | null): undefined;
7318
7575
  asSymbolTags(items: ReadonlyArray<ls.SymbolTag>): SymbolTag[];
7319
7576
  asSymbolTags(items: ReadonlyArray<ls.SymbolTag> | undefined | null): SymbolTag[] | undefined;
7320
- asSymbolInformation(item: ls.SymbolInformation, uri?: Uri): SymbolInformation;
7321
- asSymbolInformations(values: ls.SymbolInformation[], uri?: Uri): SymbolInformation[];
7322
- asSymbolInformations(values: undefined | null, uri?: Uri): undefined;
7323
- asSymbolInformations(values: ls.SymbolInformation[] | undefined | null, uri?: Uri): SymbolInformation[] | undefined;
7324
- asDocumentSymbol(value: ls.DocumentSymbol): DocumentSymbol;
7325
- asDocumentSymbols(value: undefined | null): undefined;
7326
- asDocumentSymbols(value: ls.DocumentSymbol[]): DocumentSymbol[];
7327
- asDocumentSymbols(value: ls.DocumentSymbol[] | undefined | null): DocumentSymbol[] | undefined;
7577
+ asSymbolInformation(item: ls.SymbolInformation | ls.WorkspaceSymbol): SymbolInformation;
7578
+ asSymbolInformations(values: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7579
+ asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[], token?: CancellationToken$1): Promise<SymbolInformation[]>;
7580
+ asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[] | undefined | null, token?: CancellationToken$1): Promise<SymbolInformation[] | undefined>;
7581
+ asDocumentSymbol(value: ls.DocumentSymbol, token?: CancellationToken$1): DocumentSymbol;
7582
+ asDocumentSymbols(value: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7583
+ asDocumentSymbols(value: ls.DocumentSymbol[], token?: CancellationToken$1): Promise<DocumentSymbol[]>;
7584
+ asDocumentSymbols(value: ls.DocumentSymbol[] | undefined | null, token?: CancellationToken$1): Promise<DocumentSymbol[] | undefined>;
7328
7585
  asCommand(item: ls.Command): Command;
7329
- asCommands(items: ls.Command[]): Command[];
7330
- asCommands(items: undefined | null): undefined;
7331
- asCommands(items: ls.Command[] | undefined | null): Command[] | undefined;
7332
- asCodeAction(item: ls.CodeAction): CodeAction$1;
7333
- asCodeAction(item: undefined | null): undefined;
7334
- asCodeAction(item: ls.CodeAction | undefined | null): CodeAction$1 | undefined;
7586
+ asCommands(items: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7587
+ asCommands(items: ls.Command[], token?: CancellationToken$1): Promise<Command[]>;
7588
+ asCommands(items: ls.Command[] | undefined | null, token?: CancellationToken$1): Promise<Command[] | undefined>;
7589
+ asCodeAction(item: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7590
+ asCodeAction(item: ls.CodeAction, token?: CancellationToken$1): Promise<CodeAction>;
7591
+ asCodeAction(item: ls.CodeAction | undefined | null, token?: CancellationToken$1): Promise<CodeAction | undefined>;
7335
7592
  asCodeActionKind(item: null | undefined): undefined;
7336
7593
  asCodeActionKind(item: ls.CodeActionKind): CodeActionKind;
7337
7594
  asCodeActionKind(item: ls.CodeActionKind | null | undefined): CodeActionKind | undefined;
7338
7595
  asCodeActionKinds(item: null | undefined): undefined;
7339
7596
  asCodeActionKinds(items: ls.CodeActionKind[]): CodeActionKind[];
7340
7597
  asCodeActionKinds(item: ls.CodeActionKind[] | null | undefined): CodeActionKind[] | undefined;
7598
+ asCodeActionResult(items: (ls.Command | ls.CodeAction)[], token?: CancellationToken$1): Promise<(Command | CodeAction)[]>;
7341
7599
  asCodeLens(item: ls.CodeLens): CodeLens;
7342
7600
  asCodeLens(item: undefined | null): undefined;
7343
7601
  asCodeLens(item: ls.CodeLens | undefined | null): CodeLens | undefined;
7344
- asCodeLenses(items: ls.CodeLens[]): CodeLens[];
7345
- asCodeLenses(items: undefined | null): undefined;
7346
- asCodeLenses(items: ls.CodeLens[] | undefined | null): CodeLens[] | undefined;
7347
- asWorkspaceEdit(item: ls.WorkspaceEdit): WorkspaceEdit;
7348
- asWorkspaceEdit(item: undefined | null): undefined;
7349
- asWorkspaceEdit(item: ls.WorkspaceEdit | undefined | null): WorkspaceEdit | undefined;
7602
+ asCodeLenses(items: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7603
+ asCodeLenses(items: ls.CodeLens[], token?: CancellationToken$1): Promise<CodeLens[]>;
7604
+ asCodeLenses(items: ls.CodeLens[] | undefined | null, token?: CancellationToken$1): Promise<CodeLens[] | undefined>;
7605
+ asWorkspaceEdit(item: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7606
+ asWorkspaceEdit(item: ls.WorkspaceEdit, token?: CancellationToken$1): Promise<WorkspaceEdit>;
7607
+ asWorkspaceEdit(item: ls.WorkspaceEdit | undefined | null, token?: CancellationToken$1): Promise<WorkspaceEdit | undefined>;
7350
7608
  asDocumentLink(item: ls.DocumentLink): DocumentLink;
7351
- asDocumentLinks(items: ls.DocumentLink[]): DocumentLink[];
7352
- asDocumentLinks(items: undefined | null): undefined;
7353
- asDocumentLinks(items: ls.DocumentLink[] | undefined | null): DocumentLink[] | undefined;
7609
+ asDocumentLinks(items: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7610
+ asDocumentLinks(items: ls.DocumentLink[], token?: CancellationToken$1): Promise<DocumentLink[]>;
7611
+ asDocumentLinks(items: ls.DocumentLink[] | undefined | null, token?: CancellationToken$1): Promise<DocumentLink[] | undefined>;
7354
7612
  asColor(color: ls.Color): Color;
7355
7613
  asColorInformation(ci: ls.ColorInformation): ColorInformation;
7356
- asColorInformations(colorPresentations: ls.ColorInformation[]): ColorInformation[];
7357
- asColorInformations(colorPresentations: undefined | null): undefined;
7358
- asColorInformations(colorInformation: ls.ColorInformation[] | undefined | null): ColorInformation[];
7614
+ asColorInformations(colorPresentations: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7615
+ asColorInformations(colorPresentations: ls.ColorInformation[], token?: CancellationToken$1): Promise<ColorInformation[]>;
7616
+ asColorInformations(colorInformation: ls.ColorInformation[] | undefined | null, token?: CancellationToken$1): Promise<ColorInformation[]>;
7359
7617
  asColorPresentation(cp: ls.ColorPresentation): ColorPresentation;
7360
- asColorPresentations(colorPresentations: ls.ColorPresentation[]): ColorPresentation[];
7361
- asColorPresentations(colorPresentations: undefined | null): undefined;
7362
- asColorPresentations(colorPresentations: ls.ColorPresentation[] | undefined | null): undefined;
7618
+ asColorPresentations(colorPresentations: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7619
+ asColorPresentations(colorPresentations: ls.ColorPresentation[], token?: CancellationToken$1): Promise<ColorPresentation[]>;
7620
+ asColorPresentations(colorPresentations: ls.ColorPresentation[] | undefined | null, token?: CancellationToken$1): Promise<ColorPresentation[] | undefined>;
7363
7621
  asFoldingRangeKind(kind: string | undefined): FoldingRangeKind | undefined;
7364
7622
  asFoldingRange(r: ls.FoldingRange): FoldingRange;
7365
- asFoldingRanges(foldingRanges: ls.FoldingRange[]): FoldingRange[];
7366
- asFoldingRanges(foldingRanges: undefined | null): undefined;
7367
- asFoldingRanges(foldingRanges: ls.FoldingRange[] | undefined | null): FoldingRange[] | undefined;
7368
- asFoldingRanges(foldingRanges: ls.FoldingRange[] | undefined | null): FoldingRange[] | undefined;
7623
+ asFoldingRanges(foldingRanges: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7624
+ asFoldingRanges(foldingRanges: ls.FoldingRange[], token?: CancellationToken$1): Promise<FoldingRange[]>;
7625
+ asFoldingRanges(foldingRanges: ls.FoldingRange[] | undefined | null, token?: CancellationToken$1): Promise<FoldingRange[] | undefined>;
7369
7626
  asSelectionRange(selectionRange: ls.SelectionRange): SelectionRange;
7370
- asSelectionRanges(selectionRanges: ls.SelectionRange[]): SelectionRange[];
7371
- asSelectionRanges(selectionRanges: undefined | null): undefined;
7372
- asSelectionRanges(selectionRanges: ls.SelectionRange[] | undefined | null): SelectionRange[] | undefined;
7373
- asSelectionRanges(selectionRanges: ls.SelectionRange[] | undefined | null): SelectionRange[] | undefined;
7627
+ asSelectionRanges(selectionRanges: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7628
+ asSelectionRanges(selectionRanges: ls.SelectionRange[], token?: CancellationToken$1): Promise<SelectionRange[]>;
7629
+ asSelectionRanges(selectionRanges: ls.SelectionRange[] | undefined | null, token?: CancellationToken$1): Promise<SelectionRange[] | undefined>;
7630
+ asInlineValue(value: ls.InlineValue): InlineValue;
7631
+ asInlineValues(values: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7632
+ asInlineValues(values: ls.InlineValue[], token?: CancellationToken$1): Promise<InlineValue[]>;
7633
+ asInlineValues(values: ls.InlineValue[] | undefined | null, token?: CancellationToken$1): Promise<InlineValue[] | undefined>;
7634
+ asInlayHint(value: ls.InlayHint, token?: CancellationToken$1): Promise<InlayHint>;
7635
+ asInlayHints(values: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7636
+ asInlayHints(values: ls.InlayHint[], token?: CancellationToken$1): Promise<InlayHint[]>;
7637
+ asInlayHints(values: ls.InlayHint[] | undefined | null, token?: CancellationToken$1): Promise<InlayHint[] | undefined>;
7374
7638
  asSemanticTokensLegend(value: ls.SemanticTokensLegend): SemanticTokensLegend;
7375
- asSemanticTokens(value: ls.SemanticTokens): SemanticTokens;
7376
- asSemanticTokens(value: undefined | null): undefined;
7377
- asSemanticTokens(value: ls.SemanticTokens | undefined | null): SemanticTokens | undefined;
7378
- asSemanticTokens(value: ls.SemanticTokens | undefined | null): SemanticTokens | undefined;
7639
+ asSemanticTokens(value: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7640
+ asSemanticTokens(value: ls.SemanticTokens, token?: CancellationToken$1): Promise<SemanticTokens>;
7641
+ asSemanticTokens(value: ls.SemanticTokens | undefined | null, token?: CancellationToken$1): Promise<SemanticTokens | undefined>;
7379
7642
  asSemanticTokensEdit(value: ls.SemanticTokensEdit): SemanticTokensEdit;
7380
- asSemanticTokensEdits(value: ls.SemanticTokensDelta): SemanticTokensEdits;
7381
- asSemanticTokensEdits(value: undefined | null): undefined;
7382
- asSemanticTokensEdits(value: ls.SemanticTokensDelta | undefined | null): SemanticTokensEdits | undefined;
7383
- asSemanticTokensEdits(value: ls.SemanticTokensDelta | undefined | null): SemanticTokensEdits | undefined;
7643
+ asSemanticTokensEdits(value: undefined | null, token?: CancellationToken$1): Promise<undefined>;
7644
+ asSemanticTokensEdits(value: ls.SemanticTokensDelta, token?: CancellationToken$1): Promise<SemanticTokensEdits>;
7645
+ asSemanticTokensEdits(value: ls.SemanticTokensDelta | undefined | null, token?: CancellationToken$1): Promise<SemanticTokensEdits | undefined>;
7384
7646
  asCallHierarchyItem(item: null): undefined;
7385
7647
  asCallHierarchyItem(item: ls.CallHierarchyItem): CallHierarchyItem;
7386
7648
  asCallHierarchyItem(item: ls.CallHierarchyItem | null): CallHierarchyItem | undefined;
7387
- asCallHierarchyItem(item: ls.CallHierarchyItem | null): CallHierarchyItem | undefined;
7388
- asCallHierarchyItems(items: null): undefined;
7389
- asCallHierarchyItems(items: ls.CallHierarchyItem[]): CallHierarchyItem[];
7390
- asCallHierarchyItems(items: ls.CallHierarchyItem[] | null): CallHierarchyItem[] | undefined;
7391
- asCallHierarchyItems(items: ls.CallHierarchyItem[] | null): CallHierarchyItem[] | undefined;
7392
- asCallHierarchyIncomingCall(item: ls.CallHierarchyIncomingCall): CallHierarchyIncomingCall;
7393
- asCallHierarchyIncomingCalls(items: null): undefined;
7394
- asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall>): CallHierarchyIncomingCall[];
7395
- asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall> | null): CallHierarchyIncomingCall[] | undefined;
7396
- asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall> | null): CallHierarchyIncomingCall[] | undefined;
7397
- asCallHierarchyOutgoingCall(item: ls.CallHierarchyOutgoingCall): CallHierarchyOutgoingCall;
7398
- asCallHierarchyOutgoingCalls(items: null): undefined;
7399
- asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall>): CallHierarchyOutgoingCall[];
7400
- asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall> | null): CallHierarchyOutgoingCall[] | undefined;
7401
- asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall> | null): CallHierarchyOutgoingCall[] | undefined;
7402
- asLinkedEditingRanges(value: null | undefined): undefined;
7403
- asLinkedEditingRanges(value: ls.LinkedEditingRanges): LinkedEditingRanges;
7404
- asLinkedEditingRanges(value: ls.LinkedEditingRanges | null | undefined): LinkedEditingRanges | undefined;
7649
+ asCallHierarchyItems(items: null, token?: CancellationToken$1): Promise<undefined>;
7650
+ asCallHierarchyItems(items: ls.CallHierarchyItem[], token?: CancellationToken$1): Promise<CallHierarchyItem[]>;
7651
+ asCallHierarchyItems(items: ls.CallHierarchyItem[] | null, token?: CancellationToken$1): Promise<CallHierarchyItem[] | undefined>;
7652
+ asCallHierarchyIncomingCall(item: ls.CallHierarchyIncomingCall, token?: CancellationToken$1): Promise<CallHierarchyIncomingCall>;
7653
+ asCallHierarchyIncomingCalls(items: null, token?: CancellationToken$1): Promise<undefined>;
7654
+ asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall>, token?: CancellationToken$1): Promise<CallHierarchyIncomingCall[]>;
7655
+ asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall> | null, token?: CancellationToken$1): Promise<CallHierarchyIncomingCall[] | undefined>;
7656
+ asCallHierarchyOutgoingCall(item: ls.CallHierarchyOutgoingCall, token?: CancellationToken$1): Promise<CallHierarchyOutgoingCall>;
7657
+ asCallHierarchyOutgoingCalls(items: null, token?: CancellationToken$1): Promise<undefined>;
7658
+ asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall>, token?: CancellationToken$1): Promise<CallHierarchyOutgoingCall[]>;
7659
+ asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall> | null, token?: CancellationToken$1): Promise<CallHierarchyOutgoingCall[] | undefined>;
7660
+ asLinkedEditingRanges(value: null | undefined, token?: CancellationToken$1): Promise<undefined>;
7661
+ asLinkedEditingRanges(value: ls.LinkedEditingRanges, token?: CancellationToken$1): Promise<LinkedEditingRanges>;
7662
+ asLinkedEditingRanges(value: ls.LinkedEditingRanges | null | undefined, token?: CancellationToken$1): Promise<LinkedEditingRanges | undefined>;
7663
+ asTypeHierarchyItem(item: null): undefined;
7664
+ asTypeHierarchyItem(item: ls.TypeHierarchyItem): TypeHierarchyItem;
7665
+ asTypeHierarchyItem(item: ls.TypeHierarchyItem | null): TypeHierarchyItem | undefined;
7666
+ asTypeHierarchyItems(items: null, token?: CancellationToken$1): Promise<undefined>;
7667
+ asTypeHierarchyItems(items: ls.TypeHierarchyItem[], token?: CancellationToken$1): Promise<TypeHierarchyItem[]>;
7668
+ asTypeHierarchyItems(items: ls.TypeHierarchyItem[] | null, token?: CancellationToken$1): Promise<TypeHierarchyItem[] | undefined>;
7669
+ asGlobPattern(pattern: ls.GlobPattern): GlobPattern | undefined;
7405
7670
  }
7406
7671
  interface URIConverter {
7407
7672
  (value: string): Uri;
7408
7673
  }
7409
7674
 
7410
- interface ConnectionOptions {
7411
- cancellationStrategy: CancellationStrategy;
7412
- maxRestartCount?: number;
7675
+ interface DocumentSemanticsTokensSignature {
7676
+ (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<SemanticTokens>;
7677
+ }
7678
+ interface DocumentSemanticsTokensEditsSignature {
7679
+ (this: void, document: TextDocument$1, previousResultId: string, token: CancellationToken$1): ProviderResult<SemanticTokensEdits | SemanticTokens>;
7680
+ }
7681
+ interface DocumentRangeSemanticTokensSignature {
7682
+ (this: void, document: TextDocument$1, range: Range$1, token: CancellationToken$1): ProviderResult<SemanticTokens>;
7413
7683
  }
7414
7684
  /**
7415
- * An action to be performed when the connection is producing errors.
7685
+ * The semantic token middleware
7686
+ *
7687
+ * @since 3.16.0
7416
7688
  */
7417
- declare enum ErrorAction {
7689
+ interface SemanticTokensMiddleware {
7690
+ provideDocumentSemanticTokens?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: DocumentSemanticsTokensSignature) => ProviderResult<SemanticTokens>;
7691
+ provideDocumentSemanticTokensEdits?: (this: void, document: TextDocument$1, previousResultId: string, token: CancellationToken$1, next: DocumentSemanticsTokensEditsSignature) => ProviderResult<SemanticTokensEdits | SemanticTokens>;
7692
+ provideDocumentRangeSemanticTokens?: (this: void, document: TextDocument$1, range: Range$1, token: CancellationToken$1, next: DocumentRangeSemanticTokensSignature) => ProviderResult<SemanticTokens>;
7693
+ }
7694
+ interface SemanticTokensProviderShape {
7695
+ range?: DocumentRangeSemanticTokensProvider;
7696
+ full?: DocumentSemanticTokensProvider;
7697
+ onDidChangeSemanticTokensEmitter: EventEmitter<void>;
7698
+ }
7699
+
7700
+ interface TextDocumentSynchronizationMiddleware {
7701
+ didOpen?: NextSignature<TextDocument$1, Promise<void>>;
7702
+ didChange?: NextSignature<TextDocumentChangeEvent, Promise<void>>;
7703
+ willSave?: NextSignature<TextDocumentWillSaveEvent, Promise<void>>;
7704
+ willSaveWaitUntil?: NextSignature<TextDocumentWillSaveEvent, Thenable<TextEdit$1[]>>;
7705
+ didSave?: NextSignature<TextDocument$1, Promise<void>>;
7706
+ didClose?: NextSignature<TextDocument$1, Promise<void>>;
7707
+ }
7708
+ interface DidOpenTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument$1) => Promise<void>>, NotifyingFeature<TextDocument$1, DidOpenTextDocumentParams> {
7709
+ openDocuments: Iterable<TextDocument$1>;
7710
+ }
7711
+ interface DidCloseTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument$1) => Promise<void>>, NotifyingFeature<TextDocument$1, DidCloseTextDocumentParams> {
7712
+ }
7713
+ interface DidChangeTextDocumentFeatureShape extends DynamicFeature<TextDocumentChangeRegistrationOptions>, TextDocumentSendFeature<(event: TextDocumentChangeEvent) => Promise<void>>, NotifyingFeature<TextDocumentChangeEvent, DidChangeTextDocumentParams> {
7714
+ }
7715
+ interface DidSaveTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument$1) => Promise<void>>, NotifyingFeature<TextDocument$1, DidSaveTextDocumentParams> {
7716
+ }
7717
+
7718
+ interface ProvideCodeLensesSignature {
7719
+ (this: void, document: TextDocument$1, token: CancellationToken$2): ProviderResult<CodeLens[]>;
7720
+ }
7721
+ interface ResolveCodeLensSignature {
7722
+ (this: void, codeLens: CodeLens, token: CancellationToken$2): ProviderResult<CodeLens>;
7723
+ }
7724
+ interface CodeLensMiddleware {
7725
+ provideCodeLenses?: (this: void, document: TextDocument$1, token: CancellationToken$2, next: ProvideCodeLensesSignature) => ProviderResult<CodeLens[]>;
7726
+ resolveCodeLens?: (this: void, codeLens: CodeLens, token: CancellationToken$2, next: ResolveCodeLensSignature) => ProviderResult<CodeLens>;
7727
+ }
7728
+ declare type CodeLensProviderShape = {
7729
+ provider?: CodeLensProvider;
7730
+ onDidChangeCodeLensEmitter: EventEmitter<void>;
7731
+ };
7732
+
7733
+ declare type ProvideInlineValuesSignature = (this: void, document: TextDocument$1, viewPort: Range$1, context: InlineValueContext, token: CancellationToken$2) => ProviderResult<InlineValue[]>;
7734
+ declare type InlineValueMiddleware = {
7735
+ provideInlineValues?: (this: void, document: TextDocument$1, viewPort: Range$1, context: InlineValueContext, token: CancellationToken$2, next: ProvideInlineValuesSignature) => ProviderResult<InlineValue[]>;
7736
+ };
7737
+ declare type InlineValueProviderShape = {
7738
+ provider: InlineValuesProvider;
7739
+ onDidChangeInlineValues: EventEmitter<void>;
7740
+ };
7741
+
7742
+ declare type ProvideInlayHintsSignature = (this: void, document: TextDocument$1, viewPort: Range$1, token: CancellationToken$2) => ProviderResult<InlayHint[]>;
7743
+ declare type ResolveInlayHintSignature = (this: void, item: InlayHint, token: CancellationToken$2) => ProviderResult<InlayHint>;
7744
+ declare type InlayHintsMiddleware = {
7745
+ provideInlayHints?: (this: void, document: TextDocument$1, viewPort: Range$1, token: CancellationToken$2, next: ProvideInlayHintsSignature) => ProviderResult<InlayHint[]>;
7746
+ resolveInlayHint?: (this: void, item: InlayHint, token: CancellationToken$2, next: ResolveInlayHintSignature) => ProviderResult<InlayHint>;
7747
+ };
7748
+ declare type InlayHintsProviderShape = {
7749
+ provider: InlayHintsProvider;
7750
+ onDidChangeInlayHints: EventEmitter<void>;
7751
+ };
7752
+
7753
+ declare namespace vsdiag {
7754
+ enum DocumentDiagnosticReportKind {
7755
+ full = "full",
7756
+ unChanged = "unChanged"
7757
+ }
7758
+ interface FullDocumentDiagnosticReport {
7759
+ kind: DocumentDiagnosticReportKind.full;
7760
+ resultId?: string;
7761
+ items: Diagnostic[];
7762
+ }
7763
+ interface RelatedFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
7764
+ relatedDocuments?: {
7765
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
7766
+ };
7767
+ }
7768
+ interface UnchangedDocumentDiagnosticReport {
7769
+ kind: DocumentDiagnosticReportKind.unChanged;
7770
+ resultId: string;
7771
+ }
7772
+ interface RelatedUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
7773
+ relatedDocuments?: {
7774
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
7775
+ };
7776
+ }
7777
+ type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport;
7778
+ type PreviousResultId = {
7779
+ uri: Uri;
7780
+ value: string;
7781
+ };
7782
+ interface WorkspaceFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
7783
+ uri: Uri;
7784
+ version: number | null;
7785
+ }
7786
+ interface WorkspaceUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
7787
+ uri: Uri;
7788
+ version: number | null;
7789
+ }
7790
+ type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport;
7791
+ interface WorkspaceDiagnosticReport {
7792
+ items: WorkspaceDocumentDiagnosticReport[];
7793
+ }
7794
+ interface WorkspaceDiagnosticReportPartialResult {
7795
+ items: WorkspaceDocumentDiagnosticReport[];
7796
+ }
7797
+ interface ResultReporter {
7798
+ (chunk: WorkspaceDiagnosticReportPartialResult | null): void;
7799
+ }
7800
+ interface DiagnosticProvider {
7801
+ onDidChangeDiagnostics: Event$1<void>;
7802
+ provideDiagnostics(document: TextDocument$1 | Uri, previousResultId: string | undefined, token: CancellationToken$1): ProviderResult<DocumentDiagnosticReport>;
7803
+ provideWorkspaceDiagnostics?(resultIds: PreviousResultId[], token: CancellationToken$1, resultReporter: ResultReporter): ProviderResult<WorkspaceDiagnosticReport>;
7804
+ }
7805
+ }
7806
+ declare type ProvideDiagnosticSignature = (this: void, document: TextDocument$1 | Uri, previousResultId: string | undefined, token: CancellationToken$1) => ProviderResult<vsdiag.DocumentDiagnosticReport>;
7807
+ declare type ProvideWorkspaceDiagnosticSignature = (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken$1, resultReporter: vsdiag.ResultReporter) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>;
7808
+ declare type DiagnosticProviderMiddleware = {
7809
+ provideDiagnostics?: (this: void, document: TextDocument$1 | Uri, previousResultId: string | undefined, token: CancellationToken$1, next: ProvideDiagnosticSignature) => ProviderResult<vsdiag.DocumentDiagnosticReport>;
7810
+ provideWorkspaceDiagnostics?: (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken$1, resultReporter: vsdiag.ResultReporter, next: ProvideWorkspaceDiagnosticSignature) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>;
7811
+ };
7812
+ declare enum DiagnosticPullMode {
7813
+ onType = "onType",
7814
+ onSave = "onSave"
7815
+ }
7816
+ declare type DiagnosticPullOptions = {
7418
7817
  /**
7419
- * Continue running the server.
7818
+ * Whether to pull for diagnostics on document change.
7420
7819
  */
7421
- Continue = 1,
7820
+ onChange?: boolean;
7422
7821
  /**
7423
- * Shutdown the server.
7822
+ * Whether to pull for diagnostics on document save.
7424
7823
  */
7425
- Shutdown = 2
7426
- }
7427
- /**
7428
- * An action to be performed when the connection to a server got closed.
7429
- */
7430
- declare enum CloseAction {
7824
+ onSave?: boolean;
7431
7825
  /**
7432
- * Don't restart the server. The connection stays closed.
7826
+ * An optional filter method that is consulted when triggering a
7827
+ * diagnostic pull during document change or document save.
7828
+ *
7829
+ * @param document the document that changes or got save
7830
+ * @param mode the mode
7433
7831
  */
7434
- DoNotRestart = 1,
7832
+ filter?(document: TextDocument$1, mode: DiagnosticPullMode): boolean;
7435
7833
  /**
7436
- * Restart the server.
7834
+ * Whether to pull for diagnostics on resources of non instantiated
7835
+ * tabs. If it is set to true it is highly recommended to provide
7836
+ * a match method as well. Otherwise the client will not pull for
7837
+ * tabs if the used document selector specifies a language property
7838
+ * since the language value is not known for resources.
7437
7839
  */
7438
- Restart = 2
7439
- }
7440
- /**
7441
- * A plugable error handler that is invoked when the connection is either
7442
- * producing errors or got closed.
7443
- */
7444
- interface ErrorHandler {
7840
+ onTabs?: boolean;
7445
7841
  /**
7446
- * An error has occurred while writing or reading from the connection.
7842
+ * A optional match method that is consulted when pulling for diagnostics
7843
+ * when only a URI is known (e.g. for not instantiated tabs)
7447
7844
  *
7448
- * @param error - the error received
7449
- * @param message - the message to be delivered to the server if know.
7450
- * @param count - a count indicating how often an error is received. Will
7451
- * be reset if a message got successfully send or received.
7845
+ * @param documentSelector the document selector
7846
+ * @param resource the resource.
7452
7847
  */
7453
- error(error: Error, message: Message$1 | undefined, count: number | undefined): ErrorAction;
7454
- /**
7455
- * The connection to the server got closed.
7848
+ match?(documentSelector: DocumentSelector$1, resource: Uri): boolean;
7849
+ };
7850
+ declare type $DiagnosticPullOptions = {
7851
+ diagnosticPullOptions?: DiagnosticPullOptions;
7852
+ };
7853
+ declare type DiagnosticProviderShape = {
7854
+ onDidChangeDiagnosticsEmitter: EventEmitter<void>;
7855
+ diagnostics: vsdiag.DiagnosticProvider;
7856
+ };
7857
+
7858
+ declare type VNotebookDocumentChangeEvent = {
7859
+ /**
7860
+ * The notebook document
7861
+ */
7862
+ notebook: NotebookDocument;
7863
+ /**
7864
+ * The changed meta data if any.
7456
7865
  */
7457
- closed(): CloseAction;
7866
+ metadata?: {
7867
+ [key: string]: any;
7868
+ };
7869
+ /**
7870
+ * Changes to cells.
7871
+ */
7872
+ cells?: {
7873
+ /**
7874
+ * Changes to the cell structure to add or
7875
+ * remove cells.
7876
+ */
7877
+ structure?: {
7878
+ /**
7879
+ * The change to the cell array.
7880
+ */
7881
+ array: {
7882
+ start: number;
7883
+ deleteCount: number;
7884
+ cells?: NotebookCell[];
7885
+ };
7886
+ /**
7887
+ * Additional opened cell text documents.
7888
+ */
7889
+ didOpen?: NotebookCell[];
7890
+ /**
7891
+ * Additional closed cell text documents.
7892
+ */
7893
+ didClose?: NotebookCell[];
7894
+ };
7895
+ /**
7896
+ * Changes to notebook cells properties like its
7897
+ * kind or metadata.
7898
+ */
7899
+ data?: NotebookCell[];
7900
+ /**
7901
+ * Changes to the text content of notebook cells.
7902
+ */
7903
+ textContent?: TextDocumentChangeEvent[];
7904
+ };
7905
+ };
7906
+ declare type NotebookDocumentOptions = {
7907
+ filterCells?(notebookDocument: NotebookDocument, cells: NotebookCell[]): NotebookCell[];
7908
+ };
7909
+ declare type $NotebookDocumentOptions = {
7910
+ notebookDocumentOptions?: NotebookDocumentOptions;
7911
+ };
7912
+ declare type NotebookDocumentMiddleware = {
7913
+ notebooks?: {
7914
+ didOpen?: (this: void, notebookDocument: NotebookDocument, cells: NotebookCell[], next: (this: void, notebookDocument: NotebookDocument, cells: NotebookCell[]) => Promise<void>) => Promise<void>;
7915
+ didSave?: (this: void, notebookDocument: NotebookDocument, next: (this: void, notebookDocument: NotebookDocument) => Promise<void>) => Promise<void>;
7916
+ didChange?: (this: void, event: VNotebookDocumentChangeEvent, next: (this: void, event: VNotebookDocumentChangeEvent) => Promise<void>) => Promise<void>;
7917
+ didClose?: (this: void, notebookDocument: NotebookDocument, cells: NotebookCell[], next: (this: void, notebookDocument: NotebookDocument, cells: NotebookCell[]) => Promise<void>) => Promise<void>;
7918
+ };
7919
+ };
7920
+ interface NotebookDocumentSyncFeatureShape {
7921
+ sendDidOpenNotebookDocument(notebookDocument: NotebookDocument): Promise<void>;
7922
+ sendDidSaveNotebookDocument(notebookDocument: NotebookDocument): Promise<void>;
7923
+ sendDidChangeNotebookDocument(event: VNotebookDocumentChangeEvent): Promise<void>;
7924
+ sendDidCloseNotebookDocument(notebookDocument: NotebookDocument): Promise<void>;
7925
+ }
7926
+ declare type NotebookDocumentProviderShape = {
7927
+ getProvider(notebookCell: NotebookCell): NotebookDocumentSyncFeatureShape | undefined;
7928
+ };
7929
+
7930
+ interface NextSignature<P, R> {
7931
+ (this: void, data: P, next: (data: P) => R): R;
7932
+ }
7933
+ interface RegistrationData<T> {
7934
+ id: string;
7935
+ registerOptions: T;
7458
7936
  }
7937
+ declare type FeatureState = {
7938
+ kind: 'document';
7939
+ /**
7940
+ * The features's id. This is usually the method names used during
7941
+ * registration.
7942
+ */
7943
+ id: string;
7944
+ /**
7945
+ * Has active registrations.
7946
+ */
7947
+ registrations: boolean;
7948
+ /**
7949
+ * A registration matches an open document.
7950
+ */
7951
+ matches: boolean;
7952
+ } | {
7953
+ kind: 'workspace';
7954
+ /**
7955
+ * The features's id. This is usually the method names used during
7956
+ * registration.
7957
+ */
7958
+ id: string;
7959
+ /**
7960
+ * Has active registrations.
7961
+ */
7962
+ registrations: boolean;
7963
+ } | {
7964
+ kind: 'window';
7965
+ /**
7966
+ * The features's id. This is usually the method names used during
7967
+ * registration.
7968
+ */
7969
+ id: string;
7970
+ /**
7971
+ * Has active registrations.
7972
+ */
7973
+ registrations: boolean;
7974
+ } | {
7975
+ kind: 'static';
7976
+ };
7459
7977
  /**
7460
- * A handler that is invoked when the initialization of the server failed.
7978
+ * A static feature. A static feature can't be dynamically activated via the
7979
+ * server. It is wired during the initialize sequence.
7461
7980
  */
7462
- interface InitializationFailedHandler {
7981
+ interface StaticFeature {
7982
+ /**
7983
+ * Called to fill the initialize params.
7984
+ *
7985
+ * @params the initialize params.
7986
+ */
7987
+ fillInitializeParams?: (params: InitializeParams) => void;
7988
+ /**
7989
+ * Called to fill in the client capabilities this feature implements.
7990
+ *
7991
+ * @param capabilities The client capabilities to fill.
7992
+ */
7993
+ fillClientCapabilities(capabilities: ClientCapabilities): void;
7463
7994
  /**
7464
- * @param error The error returned from the server
7465
- * @returns if true is returned the client tries to reinitialize the server.
7466
- * Implementors of a handler are responsible to not initialize the server
7467
- * infinitely. Return false if initialization should stop and an error
7468
- * should be reported.
7995
+ * A preflight where the server capabilities are shown to all features
7996
+ * before a feature is actually initialized. This allows feature to
7997
+ * capture some state if they are a pre-requisite for other features.
7998
+ *
7999
+ * @param capabilities the server capabilities
8000
+ * @param documentSelector the document selector pass to the client's constructor.
8001
+ * May be `undefined` if the client was created without a selector.
7469
8002
  */
7470
- (error: ResponseError$1<InitializeError> | Error | any): boolean;
8003
+ preInitialize?: (capabilities: ServerCapabilities, documentSelector: DocumentSelector$1 | undefined) => void;
8004
+ /**
8005
+ * Initialize the feature. This method is called on a feature instance
8006
+ * when the client has successfully received the initialize request from
8007
+ * the server and before the client sends the initialized notification
8008
+ * to the server.
8009
+ *
8010
+ * @param capabilities the server capabilities
8011
+ * @param documentSelector the document selector pass to the client's constructor.
8012
+ * May be `undefined` if the client was created without a selector.
8013
+ */
8014
+ initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector$1 | undefined): void;
8015
+ /**
8016
+ * Returns the state the feature is in.
8017
+ */
8018
+ getState(): FeatureState;
8019
+ /**
8020
+ * Called when the client is stopped to dispose this feature. Usually a feature
8021
+ * un-registers listeners registered hooked up with the VS Code extension host.
8022
+ */
8023
+ dispose(): void;
8024
+ }
8025
+ declare namespace StaticFeature {
8026
+ function is(value: any): value is StaticFeature;
7471
8027
  }
7472
- interface SynchronizeOptions {
8028
+ /**
8029
+ * A dynamic feature can be activated via the server.
8030
+ */
8031
+ interface DynamicFeature<RO> {
8032
+ /**
8033
+ * Called to fill the initialize params.
8034
+ *
8035
+ * @params the initialize params.
8036
+ */
8037
+ fillInitializeParams?: (params: InitializeParams) => void;
8038
+ /**
8039
+ * Called to fill in the client capabilities this feature implements.
8040
+ *
8041
+ * @param capabilities The client capabilities to fill.
8042
+ */
8043
+ fillClientCapabilities(capabilities: ClientCapabilities): void;
8044
+ /**
8045
+ * A preflight where the server capabilities are shown to all features
8046
+ * before a feature is actually initialized. This allows feature to
8047
+ * capture some state if they are a pre-requisite for other features.
8048
+ *
8049
+ * @param capabilities the server capabilities
8050
+ * @param documentSelector the document selector pass to the client's constructor.
8051
+ * May be `undefined` if the client was created without a selector.
8052
+ */
8053
+ preInitialize?: (capabilities: ServerCapabilities, documentSelector: DocumentSelector$1 | undefined) => void;
8054
+ /**
8055
+ * Initialize the feature. This method is called on a feature instance
8056
+ * when the client has successfully received the initialize request from
8057
+ * the server and before the client sends the initialized notification
8058
+ * to the server.
8059
+ *
8060
+ * @param capabilities the server capabilities.
8061
+ * @param documentSelector the document selector pass to the client's constructor.
8062
+ * May be `undefined` if the client was created without a selector.
8063
+ */
8064
+ initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector$1 | undefined): void;
8065
+ /**
8066
+ * Returns the state the feature is in.
8067
+ */
8068
+ getState(): FeatureState;
8069
+ /**
8070
+ * The signature (e.g. method) for which this features support dynamic activation / registration.
8071
+ */
8072
+ registrationType: RegistrationType<RO>;
8073
+ /**
8074
+ * Is called when the server send a register request for the given message.
8075
+ *
8076
+ * @param data additional registration data as defined in the protocol.
8077
+ */
8078
+ register(data: RegistrationData<RO>): void;
8079
+ /**
8080
+ * Is called when the server wants to unregister a feature.
8081
+ *
8082
+ * @param id the id used when registering the feature.
8083
+ */
8084
+ unregister(id: string): void;
8085
+ /**
8086
+ * Called when the client is stopped to dispose this feature. Usually a feature
8087
+ * un-registers listeners registered hooked up with the VS Code extension host.
8088
+ */
8089
+ dispose(): void;
8090
+ }
8091
+ declare namespace DynamicFeature {
8092
+ function is<T>(value: any): value is DynamicFeature<T>;
8093
+ }
8094
+ interface NotificationSendEvent<E, P> {
8095
+ original: E;
8096
+ type: ProtocolNotificationType<P, TextDocumentRegistrationOptions>;
8097
+ params: P;
8098
+ }
8099
+ interface NotifyingFeature<E, P> {
8100
+ onNotificationSent: Event$1<NotificationSendEvent<E, P>>;
8101
+ }
8102
+ /**
8103
+ * A mixin type that allows to send notification or requests using a registered
8104
+ * provider.
8105
+ */
8106
+ interface TextDocumentSendFeature<T extends Function> {
8107
+ /**
8108
+ * Returns a provider for the given text document.
8109
+ */
8110
+ getProvider(document: TextDocument$1): {
8111
+ send: T;
8112
+ } | undefined;
8113
+ }
8114
+ /**
8115
+ * A mixin type to access a provider that is registered for a
8116
+ * given text document / document selector.
8117
+ */
8118
+ interface TextDocumentProviderFeature<T> {
8119
+ /**
8120
+ * Triggers the corresponding RPC method.
8121
+ */
8122
+ getProvider(textDocument: TextDocument$1): T | undefined;
8123
+ }
8124
+ interface WorkspaceProviderFeature<PR> {
8125
+ getProviders(): PR[] | undefined;
8126
+ }
8127
+ interface FeatureClient<M, CO = object> {
8128
+ protocol2CodeConverter: Converter;
8129
+ code2ProtocolConverter: Converter$1;
8130
+ clientOptions: CO;
8131
+ middleware: M;
8132
+ start(): Promise<void>;
8133
+ isRunning(): boolean;
8134
+ stop(): Promise<void>;
8135
+ sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken$1): Promise<R>;
8136
+ sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken$1): Promise<R>;
8137
+ sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken$1): Promise<R>;
8138
+ sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken$1): Promise<R>;
8139
+ sendRequest<R>(method: string, token?: CancellationToken$1): Promise<R>;
8140
+ sendRequest<R>(method: string, param: any, token?: CancellationToken$1): Promise<R>;
8141
+ onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable$1;
8142
+ onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable$1;
8143
+ onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable$1;
8144
+ onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable$1;
8145
+ onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable$1;
8146
+ sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
8147
+ sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
8148
+ sendNotification(type: NotificationType0): Promise<void>;
8149
+ sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
8150
+ sendNotification(method: string): Promise<void>;
8151
+ sendNotification(method: string, params: any): Promise<void>;
8152
+ onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable$1;
8153
+ onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable$1;
8154
+ onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable$1;
8155
+ onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable$1;
8156
+ onNotification(method: string, handler: GenericNotificationHandler): Disposable$1;
8157
+ onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable$1;
8158
+ info(message: string, data?: any, showNotification?: boolean): void;
8159
+ warn(message: string, data?: any, showNotification?: boolean): void;
8160
+ error(message: string, data?: any, showNotification?: boolean | 'force'): void;
8161
+ handleFailedRequest<T>(type: MessageSignature, token: CancellationToken$1 | undefined, error: any, defaultValue: T, showNotification?: boolean): T;
8162
+ hasDedicatedTextSynchronizationFeature(textDocument: TextDocument$1): boolean;
8163
+ getFeature(request: typeof DidOpenTextDocumentNotification.method): DidOpenTextDocumentFeatureShape;
8164
+ getFeature(request: typeof DidChangeTextDocumentNotification.method): DidChangeTextDocumentFeatureShape;
8165
+ getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument$1) => Promise<void>>;
8166
+ getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument$1) => ProviderResult<TextEdit$1[]>>;
8167
+ getFeature(request: typeof DidSaveTextDocumentNotification.method): DidSaveTextDocumentFeatureShape;
8168
+ getFeature(request: typeof DidCloseTextDocumentNotification.method): DidCloseTextDocumentFeatureShape;
8169
+ getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
8170
+ send: (event: FileCreateEvent) => Promise<void>;
8171
+ };
8172
+ getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
8173
+ send: (event: FileRenameEvent) => Promise<void>;
8174
+ };
8175
+ getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
8176
+ send: (event: FileDeleteEvent) => Promise<void>;
8177
+ };
8178
+ getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
8179
+ send: (event: FileWillCreateEvent) => Promise<void>;
8180
+ };
8181
+ getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
8182
+ send: (event: FileWillRenameEvent) => Promise<void>;
8183
+ };
8184
+ getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
8185
+ send: (event: FileWillDeleteEvent) => Promise<void>;
8186
+ };
8187
+ getFeature(request: typeof CompletionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CompletionItemProvider>;
8188
+ getFeature(request: typeof HoverRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<HoverProvider>;
8189
+ getFeature(request: typeof SignatureHelpRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SignatureHelpProvider>;
8190
+ getFeature(request: typeof DefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DefinitionProvider>;
8191
+ getFeature(request: typeof ReferencesRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ReferenceProvider>;
8192
+ getFeature(request: typeof DocumentHighlightRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentHighlightProvider>;
8193
+ getFeature(request: typeof CodeActionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeActionProvider>;
8194
+ getFeature(request: typeof CodeLensRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeLensProviderShape>;
8195
+ getFeature(request: typeof DocumentFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentFormattingEditProvider>;
8196
+ getFeature(request: typeof DocumentRangeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentRangeFormattingEditProvider>;
8197
+ getFeature(request: typeof DocumentOnTypeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<OnTypeFormattingEditProvider>;
8198
+ getFeature(request: typeof RenameRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<RenameProvider>;
8199
+ getFeature(request: typeof DocumentSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentSymbolProvider>;
8200
+ getFeature(request: typeof DocumentLinkRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentLinkProvider>;
8201
+ getFeature(request: typeof DocumentColorRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentColorProvider>;
8202
+ getFeature(request: typeof DeclarationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DeclarationProvider>;
8203
+ getFeature(request: typeof FoldingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<FoldingRangeProvider>;
8204
+ getFeature(request: typeof ImplementationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ImplementationProvider>;
8205
+ getFeature(request: typeof SelectionRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SelectionRangeProvider>;
8206
+ getFeature(request: typeof TypeDefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeDefinitionProvider>;
8207
+ getFeature(request: typeof CallHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CallHierarchyProvider>;
8208
+ getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviderShape>;
8209
+ getFeature(request: typeof LinkedEditingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<LinkedEditingRangeProvider>;
8210
+ getFeature(request: typeof TypeHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeHierarchyProvider>;
8211
+ getFeature(request: typeof InlineValueRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlineValueProviderShape>;
8212
+ getFeature(request: typeof InlayHintRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlayHintsProviderShape>;
8213
+ getFeature(request: typeof WorkspaceSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & WorkspaceProviderFeature<WorkspaceSymbolProvider>;
8214
+ getFeature(request: typeof DocumentDiagnosticRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DiagnosticProviderShape> | undefined;
8215
+ getFeature(request: typeof NotebookDocumentSyncRegistrationType.method): DynamicFeature<NotebookDocumentSyncRegistrationOptions> & NotebookDocumentProviderShape | undefined;
8216
+ }
8217
+
8218
+ interface PrepareCallHierarchySignature {
8219
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
8220
+ }
8221
+ interface CallHierarchyIncomingCallsSignature {
8222
+ (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyIncomingCall[]>;
8223
+ }
8224
+ interface CallHierarchyOutgoingCallsSignature {
8225
+ (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyOutgoingCall[]>;
8226
+ }
8227
+ /**
8228
+ * Call hierarchy middleware
8229
+ *
8230
+ * @since 3.16.0
8231
+ */
8232
+ interface CallHierarchyMiddleware {
8233
+ prepareCallHierarchy?: (this: void, document: TextDocument$1, positions: Position$1, token: CancellationToken$1, next: PrepareCallHierarchySignature) => ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
8234
+ provideCallHierarchyIncomingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyIncomingCallsSignature) => ProviderResult<CallHierarchyIncomingCall[]>;
8235
+ provideCallHierarchyOutgoingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyOutgoingCallsSignature) => ProviderResult<CallHierarchyOutgoingCall[]>;
8236
+ }
8237
+
8238
+ interface ProvideCodeActionsSignature {
8239
+ (this: void, document: TextDocument$1, range: Range$1, context: CodeActionContext, token: CancellationToken$2): ProviderResult<(Command | CodeAction)[]>;
8240
+ }
8241
+ interface ResolveCodeActionSignature {
8242
+ (this: void, item: CodeAction, token: CancellationToken$2): ProviderResult<CodeAction>;
8243
+ }
8244
+ interface CodeActionMiddleware {
8245
+ provideCodeActions?: (this: void, document: TextDocument$1, range: Range$1, context: CodeActionContext, token: CancellationToken$2, next: ProvideCodeActionsSignature) => ProviderResult<(Command | CodeAction)[]>;
8246
+ resolveCodeAction?: (this: void, item: CodeAction, token: CancellationToken$2, next: ResolveCodeActionSignature) => ProviderResult<CodeAction>;
8247
+ }
8248
+
8249
+ interface ProvideDocumentColorsSignature {
8250
+ (document: TextDocument$1, token: CancellationToken$2): ProviderResult<ColorInformation[]>;
8251
+ }
8252
+ interface ProvideColorPresentationSignature {
8253
+ (color: Color, context: {
8254
+ document: TextDocument$1;
8255
+ range: Range$1;
8256
+ }, token: CancellationToken$2): ProviderResult<ColorPresentation[]>;
8257
+ }
8258
+ interface ColorProviderMiddleware {
8259
+ provideDocumentColors?: (this: void, document: TextDocument$1, token: CancellationToken$2, next: ProvideDocumentColorsSignature) => ProviderResult<ColorInformation[]>;
8260
+ provideColorPresentations?: (this: void, color: Color, context: {
8261
+ document: TextDocument$1;
8262
+ range: Range$1;
8263
+ }, token: CancellationToken$2, next: ProvideColorPresentationSignature) => ProviderResult<ColorPresentation[]>;
8264
+ }
8265
+
8266
+ interface ProvideCompletionItemsSignature {
8267
+ (this: void, document: TextDocument$1, position: Position$1, context: CompletionContext, token: CancellationToken$1): ProviderResult<CompletionItem[] | CompletionList>;
8268
+ }
8269
+ interface ResolveCompletionItemSignature {
8270
+ (this: void, item: CompletionItem, token: CancellationToken$1): ProviderResult<CompletionItem>;
8271
+ }
8272
+ interface CompletionMiddleware {
8273
+ provideCompletionItem?: (this: void, document: TextDocument$1, position: Position$1, context: CompletionContext, token: CancellationToken$1, next: ProvideCompletionItemsSignature) => ProviderResult<CompletionItem[] | CompletionList>;
8274
+ resolveCompletionItem?: (this: void, item: CompletionItem, token: CancellationToken$1, next: ResolveCompletionItemSignature) => ProviderResult<CompletionItem>;
8275
+ }
8276
+
8277
+ interface ConfigurationMiddleware {
8278
+ configuration?: ConfigurationRequest.MiddlewareSignature;
8279
+ }
8280
+ interface DidChangeConfigurationSignature {
8281
+ (this: void, sections: string[] | undefined): Promise<void>;
8282
+ }
8283
+ interface DidChangeConfigurationMiddleware {
8284
+ didChangeConfiguration?: (this: void, sections: string[] | undefined, next: DidChangeConfigurationSignature) => Promise<void>;
8285
+ }
8286
+ declare type SynchronizeOptions = {
7473
8287
  /**
7474
8288
  * The configuration sections to synchronize. Pushing settings from the
7475
8289
  * client to the server is deprecated in favour of the new pull model
@@ -7486,291 +8300,368 @@ interface SynchronizeOptions {
7486
8300
  * files outside a workspace folder.
7487
8301
  */
7488
8302
  fileEvents?: FileSystemWatcher | FileSystemWatcher[];
8303
+ };
8304
+ declare type $ConfigurationOptions = {
8305
+ synchronize?: SynchronizeOptions;
8306
+ workspaceFolder?: WorkspaceFolder;
8307
+ };
8308
+
8309
+ interface ProvideDeclarationSignature {
8310
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Declaration>;
7489
8311
  }
7490
- declare enum RevealOutputChannelOn {
7491
- Info = 1,
7492
- Warn = 2,
7493
- Error = 3,
7494
- Never = 4
7495
- }
7496
- interface HandleDiagnosticsSignature {
7497
- (this: void, uri: Uri, diagnostics: Diagnostic[]): void;
7498
- }
7499
- interface HandleWorkDoneProgressSignature {
7500
- (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd): void;
7501
- }
7502
- interface ProvideCompletionItemsSignature {
7503
- (this: void, document: TextDocument$1, position: Position$1, context: CompletionContext, token: CancellationToken$1): ProviderResult<CompletionItem[] | CompletionList>;
7504
- }
7505
- interface ResolveCompletionItemSignature {
7506
- (this: void, item: CompletionItem, token: CancellationToken$1): ProviderResult<CompletionItem>;
7507
- }
7508
- interface ProvideHoverSignature {
7509
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<Hover>;
7510
- }
7511
- interface ProvideSignatureHelpSignature {
7512
- (this: void, document: TextDocument$1, position: Position$1, context: SignatureHelpContext, token: CancellationToken$1): ProviderResult<SignatureHelp>;
8312
+ interface DeclarationMiddleware {
8313
+ provideDeclaration?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideDeclarationSignature) => ProviderResult<Declaration>;
7513
8314
  }
8315
+
7514
8316
  interface ProvideDefinitionSignature {
7515
8317
  (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<Definition | DefinitionLink[]>;
7516
8318
  }
7517
- interface ProvideReferencesSignature {
7518
- (this: void, document: TextDocument$1, position: Position$1, options: {
7519
- includeDeclaration: boolean;
7520
- }, token: CancellationToken$1): ProviderResult<Location[]>;
8319
+ interface DefinitionMiddleware {
8320
+ provideDefinition?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
7521
8321
  }
8322
+
7522
8323
  interface ProvideDocumentHighlightsSignature {
7523
8324
  (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<DocumentHighlight[]>;
7524
8325
  }
8326
+ interface DocumentHighlightMiddleware {
8327
+ provideDocumentHighlights?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideDocumentHighlightsSignature) => ProviderResult<DocumentHighlight[]>;
8328
+ }
8329
+
8330
+ interface ProvideDocumentLinksSignature {
8331
+ (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<DocumentLink[]>;
8332
+ }
8333
+ interface ResolveDocumentLinkSignature {
8334
+ (this: void, link: DocumentLink, token: CancellationToken$1): ProviderResult<DocumentLink>;
8335
+ }
8336
+ interface DocumentLinkMiddleware {
8337
+ provideDocumentLinks?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: ProvideDocumentLinksSignature) => ProviderResult<DocumentLink[]>;
8338
+ resolveDocumentLink?: (this: void, link: DocumentLink, token: CancellationToken$1, next: ResolveDocumentLinkSignature) => ProviderResult<DocumentLink>;
8339
+ }
8340
+
7525
8341
  interface ProvideDocumentSymbolsSignature {
7526
8342
  (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
7527
8343
  }
7528
- interface ProvideWorkspaceSymbolsSignature {
7529
- (this: void, query: string, token: CancellationToken$1): ProviderResult<SymbolInformation[]>;
8344
+ interface DocumentSymbolMiddleware {
8345
+ provideDocumentSymbols?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: ProvideDocumentSymbolsSignature) => ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
7530
8346
  }
7531
- interface ProvideCodeActionsSignature {
7532
- (this: void, document: TextDocument$1, range: Range$1, context: CodeActionContext, token: CancellationToken$1): ProviderResult<(Command | CodeAction$1)[]>;
8347
+
8348
+ interface ExecuteCommandSignature {
8349
+ (this: void, command: string, args: any[]): ProviderResult<any>;
7533
8350
  }
7534
- interface ResolveCodeActionSignature {
7535
- (this: void, item: CodeAction$1, token: CancellationToken$1): ProviderResult<CodeAction$1>;
8351
+ interface ExecuteCommandMiddleware {
8352
+ executeCommand?: (this: void, command: string, args: any[], next: ExecuteCommandSignature) => ProviderResult<any>;
7536
8353
  }
7537
- interface ProvideCodeLensesSignature {
7538
- (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<CodeLens[]>;
8354
+
8355
+ /**
8356
+ * File operation middleware
8357
+ *
8358
+ * @since 3.16.0
8359
+ */
8360
+ interface FileOperationsMiddleware {
8361
+ didCreateFiles?: NextSignature<FileCreateEvent, Promise<void>>;
8362
+ willCreateFiles?: NextSignature<FileWillCreateEvent, Thenable<WorkspaceEdit | null | undefined>>;
8363
+ didRenameFiles?: NextSignature<FileRenameEvent, Promise<void>>;
8364
+ willRenameFiles?: NextSignature<FileWillRenameEvent, Thenable<WorkspaceEdit | null | undefined>>;
8365
+ didDeleteFiles?: NextSignature<FileDeleteEvent, Promise<void>>;
8366
+ willDeleteFiles?: NextSignature<FileWillDeleteEvent, Thenable<WorkspaceEdit | null | undefined>>;
7539
8367
  }
7540
- interface ResolveCodeLensSignature {
7541
- (this: void, codeLens: CodeLens, token: CancellationToken$1): ProviderResult<CodeLens>;
8368
+
8369
+ interface ProvideFoldingRangeSignature {
8370
+ (this: void, document: TextDocument$1, context: FoldingContext, token: CancellationToken$2): ProviderResult<FoldingRange[]>;
7542
8371
  }
8372
+ interface FoldingRangeProviderMiddleware {
8373
+ provideFoldingRanges?: (this: void, document: TextDocument$1, context: FoldingContext, token: CancellationToken$2, next: ProvideFoldingRangeSignature) => ProviderResult<FoldingRange[]>;
8374
+ }
8375
+
7543
8376
  interface ProvideDocumentFormattingEditsSignature {
7544
- (this: void, document: TextDocument$1, options: FormattingOptions, token: CancellationToken$1): ProviderResult<TextEdit$1[]>;
8377
+ (this: void, document: TextDocument$1, options: FormattingOptions, token: CancellationToken$2): ProviderResult<TextEdit$1[]>;
7545
8378
  }
7546
8379
  interface ProvideDocumentRangeFormattingEditsSignature {
7547
- (this: void, document: TextDocument$1, range: Range$1, options: FormattingOptions, token: CancellationToken$1): ProviderResult<TextEdit$1[]>;
8380
+ (this: void, document: TextDocument$1, range: Range$1, options: FormattingOptions, token: CancellationToken$2): ProviderResult<TextEdit$1[]>;
7548
8381
  }
7549
8382
  interface ProvideOnTypeFormattingEditsSignature {
7550
- (this: void, document: TextDocument$1, position: Position$1, ch: string, options: FormattingOptions, token: CancellationToken$1): ProviderResult<TextEdit$1[]>;
7551
- }
7552
- interface ProvideRenameEditsSignature {
7553
- (this: void, document: TextDocument$1, position: Position$1, newName: string, token: CancellationToken$1): ProviderResult<WorkspaceEdit>;
7554
- }
7555
- interface PrepareRenameSignature {
7556
- (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<Range$1 | {
7557
- range: Range$1;
7558
- placeholder: string;
7559
- }>;
7560
- }
7561
- interface ProvideDocumentLinksSignature {
7562
- (this: void, document: TextDocument$1, token: CancellationToken$1): ProviderResult<DocumentLink[]>;
8383
+ (this: void, document: TextDocument$1, position: Position$1, ch: string, options: FormattingOptions, token: CancellationToken$2): ProviderResult<TextEdit$1[]>;
7563
8384
  }
7564
- interface ResolveDocumentLinkSignature {
7565
- (this: void, link: DocumentLink, token: CancellationToken$1): ProviderResult<DocumentLink>;
8385
+ interface FormattingMiddleware {
8386
+ provideDocumentFormattingEdits?: (this: void, document: TextDocument$1, options: FormattingOptions, token: CancellationToken$2, next: ProvideDocumentFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
8387
+ provideDocumentRangeFormattingEdits?: (this: void, document: TextDocument$1, range: Range$1, options: FormattingOptions, token: CancellationToken$2, next: ProvideDocumentRangeFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
8388
+ provideOnTypeFormattingEdits?: (this: void, document: TextDocument$1, position: Position$1, ch: string, options: FormattingOptions, token: CancellationToken$2, next: ProvideOnTypeFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
7566
8389
  }
7567
- interface ExecuteCommandSignature {
7568
- (this: void, command: string, args: any[]): ProviderResult<any>;
7569
- }
7570
- interface NextSignature<P, R> {
7571
- (this: void, data: P, next: (data: P) => R): R;
8390
+
8391
+ interface ProvideHoverSignature {
8392
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<Hover>;
7572
8393
  }
7573
- interface DidChangeConfigurationSignature {
7574
- (this: void, sections: string[] | undefined): void;
8394
+ interface HoverMiddleware {
8395
+ provideHover?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideHoverSignature) => ProviderResult<Hover>;
7575
8396
  }
7576
- interface DidChangeWatchedFileSignature {
7577
- (this: void, event: FileEvent): void;
8397
+
8398
+ interface ProvideImplementationSignature {
8399
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Definition | DefinitionLink[]>;
7578
8400
  }
7579
- interface _WorkspaceMiddleware {
7580
- didChangeConfiguration?: (this: void, sections: string[] | undefined, next: DidChangeConfigurationSignature) => void;
7581
- didChangeWatchedFile?: (this: void, event: FileEvent, next: DidChangeWatchedFileSignature) => void;
8401
+ interface ImplementationMiddleware {
8402
+ provideImplementation?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideImplementationSignature) => ProviderResult<Definition | DefinitionLink[]>;
7582
8403
  }
7583
- declare type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationWorkspaceMiddleware & WorkspaceFolderWorkspaceMiddleware & FileOperationsMiddleware;
7584
- interface _WindowMiddleware {
7585
- showDocument?: (this: void, params: ShowDocumentParams, next: ShowDocumentRequest.HandlerSignature) => Promise<ShowDocumentResult>;
8404
+
8405
+ interface ProvideLinkedEditingRangeSignature {
8406
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1): ProviderResult<LinkedEditingRanges>;
7586
8407
  }
7587
- declare type WindowMiddleware = _WindowMiddleware;
7588
8408
  /**
7589
- * The Middleware lets extensions intercept the request and notifications send and received
7590
- * from the server
8409
+ * Linked editing middleware
8410
+ *
8411
+ * @since 3.16.0
7591
8412
  */
7592
- interface _Middleware {
7593
- didOpen?: NextSignature<TextDocument$1, void>;
7594
- didChange?: NextSignature<TextDocumentChangeEvent, void>;
7595
- willSave?: NextSignature<TextDocumentWillSaveEvent, void>;
7596
- willSaveWaitUntil?: NextSignature<TextDocumentWillSaveEvent, Thenable<TextEdit$1[]>>;
7597
- didSave?: NextSignature<TextDocument$1, void>;
7598
- didClose?: NextSignature<TextDocument$1, void>;
7599
- handleDiagnostics?: (this: void, uri: Uri, diagnostics: Diagnostic[], next: HandleDiagnosticsSignature) => void;
7600
- handleWorkDoneProgress?: (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd, next: HandleWorkDoneProgressSignature) => void;
7601
- provideCompletionItem?: (this: void, document: TextDocument$1, position: Position$1, context: CompletionContext, token: CancellationToken$1, next: ProvideCompletionItemsSignature) => ProviderResult<CompletionItem[] | CompletionList>;
7602
- resolveCompletionItem?: (this: void, item: CompletionItem, token: CancellationToken$1, next: ResolveCompletionItemSignature) => ProviderResult<CompletionItem>;
7603
- provideHover?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideHoverSignature) => ProviderResult<Hover>;
7604
- provideSignatureHelp?: (this: void, document: TextDocument$1, position: Position$1, context: SignatureHelpContext, token: CancellationToken$1, next: ProvideSignatureHelpSignature) => ProviderResult<SignatureHelp>;
7605
- provideDefinition?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
8413
+ interface LinkedEditingRangeMiddleware {
8414
+ provideLinkedEditingRange?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideLinkedEditingRangeSignature) => ProviderResult<LinkedEditingRanges>;
8415
+ }
8416
+
8417
+ interface ProvideReferencesSignature {
8418
+ (this: void, document: TextDocument$1, position: Position$1, options: {
8419
+ includeDeclaration: boolean;
8420
+ }, token: CancellationToken$1): ProviderResult<Location[]>;
8421
+ }
8422
+ interface ReferencesMiddleware {
7606
8423
  provideReferences?: (this: void, document: TextDocument$1, position: Position$1, options: {
7607
8424
  includeDeclaration: boolean;
7608
8425
  }, token: CancellationToken$1, next: ProvideReferencesSignature) => ProviderResult<Location[]>;
7609
- provideDocumentHighlights?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: ProvideDocumentHighlightsSignature) => ProviderResult<DocumentHighlight[]>;
7610
- provideDocumentSymbols?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: ProvideDocumentSymbolsSignature) => ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
7611
- provideWorkspaceSymbols?: (this: void, query: string, token: CancellationToken$1, next: ProvideWorkspaceSymbolsSignature) => ProviderResult<SymbolInformation[]>;
7612
- provideCodeActions?: (this: void, document: TextDocument$1, range: Range$1, context: CodeActionContext, token: CancellationToken$1, next: ProvideCodeActionsSignature) => ProviderResult<(Command | CodeAction$1)[]>;
7613
- resolveCodeAction?: (this: void, item: CodeAction$1, token: CancellationToken$1, next: ResolveCodeActionSignature) => ProviderResult<CodeAction$1>;
7614
- provideCodeLenses?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: ProvideCodeLensesSignature) => ProviderResult<CodeLens[]>;
7615
- resolveCodeLens?: (this: void, codeLens: CodeLens, token: CancellationToken$1, next: ResolveCodeLensSignature) => ProviderResult<CodeLens>;
7616
- provideDocumentFormattingEdits?: (this: void, document: TextDocument$1, options: FormattingOptions, token: CancellationToken$1, next: ProvideDocumentFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
7617
- provideDocumentRangeFormattingEdits?: (this: void, document: TextDocument$1, range: Range$1, options: FormattingOptions, token: CancellationToken$1, next: ProvideDocumentRangeFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
7618
- provideOnTypeFormattingEdits?: (this: void, document: TextDocument$1, position: Position$1, ch: string, options: FormattingOptions, token: CancellationToken$1, next: ProvideOnTypeFormattingEditsSignature) => ProviderResult<TextEdit$1[]>;
7619
- provideRenameEdits?: (this: void, document: TextDocument$1, position: Position$1, newName: string, token: CancellationToken$1, next: ProvideRenameEditsSignature) => ProviderResult<WorkspaceEdit>;
7620
- prepareRename?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1, next: PrepareRenameSignature) => ProviderResult<Range$1 | {
8426
+ }
8427
+
8428
+ interface ProvideRenameEditsSignature {
8429
+ (this: void, document: TextDocument$1, position: Position$1, newName: string, token: CancellationToken$2): ProviderResult<WorkspaceEdit>;
8430
+ }
8431
+ interface PrepareRenameSignature {
8432
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Range$1 | {
7621
8433
  range: Range$1;
7622
8434
  placeholder: string;
7623
8435
  }>;
7624
- provideDocumentLinks?: (this: void, document: TextDocument$1, token: CancellationToken$1, next: ProvideDocumentLinksSignature) => ProviderResult<DocumentLink[]>;
7625
- resolveDocumentLink?: (this: void, link: DocumentLink, token: CancellationToken$1, next: ResolveDocumentLinkSignature) => ProviderResult<DocumentLink>;
7626
- executeCommand?: (this: void, command: string, args: any[], next: ExecuteCommandSignature) => ProviderResult<any>;
7627
- workspace?: WorkspaceMiddleware;
7628
- window?: WindowMiddleware;
7629
8436
  }
7630
- declare type Middleware = _Middleware & TypeDefinitionMiddleware & ImplementationMiddleware & ColorProviderMiddleware & FoldingRangeProviderMiddleware & DeclarationMiddleware & SelectionRangeProviderMiddleware & CallHierarchyMiddleware & SemanticTokensMiddleware & LinkedEditingRangeMiddleware;
7631
- interface LanguageClientOptions$1 {
7632
- documentSelector?: DocumentSelector | string[];
7633
- synchronize?: SynchronizeOptions;
7634
- diagnosticCollectionName?: string;
7635
- outputChannel?: OutputChannel$1;
7636
- outputChannelName?: string;
7637
- traceOutputChannel?: OutputChannel$1;
7638
- revealOutputChannelOn?: RevealOutputChannelOn;
7639
- /**
7640
- * The encoding use to read stdout and stderr. Defaults
7641
- * to 'utf8' if omitted.
7642
- */
7643
- stdioEncoding?: string;
7644
- initializationOptions?: any | (() => any);
7645
- initializationFailedHandler?: InitializationFailedHandler;
7646
- progressOnInitialization?: boolean;
7647
- errorHandler?: ErrorHandler;
7648
- middleware?: Middleware;
7649
- uriConverters?: {
7650
- code2Protocol: URIConverter$1;
7651
- protocol2Code: URIConverter;
7652
- };
7653
- workspaceFolder?: WorkspaceFolder;
7654
- connectionOptions?: ConnectionOptions;
7655
- markdown?: {
7656
- isTrusted?: boolean;
7657
- };
8437
+ interface RenameMiddleware {
8438
+ provideRenameEdits?: (this: void, document: TextDocument$1, position: Position$1, newName: string, token: CancellationToken$2, next: ProvideRenameEditsSignature) => ProviderResult<WorkspaceEdit>;
8439
+ prepareRename?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: PrepareRenameSignature) => ProviderResult<Range$1 | {
8440
+ range: Range$1;
8441
+ placeholder: string;
8442
+ }>;
7658
8443
  }
7659
- declare enum State {
7660
- Stopped = 1,
7661
- Starting = 3,
7662
- Running = 2
8444
+
8445
+ interface ProvideSelectionRangeSignature {
8446
+ (this: void, document: TextDocument$1, positions: readonly Position$1[], token: CancellationToken$2): ProviderResult<SelectionRange[]>;
7663
8447
  }
7664
- interface StateChangeEvent {
7665
- oldState: State;
7666
- newState: State;
8448
+ interface SelectionRangeProviderMiddleware {
8449
+ provideSelectionRanges?: (this: void, document: TextDocument$1, positions: readonly Position$1[], token: CancellationToken$2, next: ProvideSelectionRangeSignature) => ProviderResult<SelectionRange[]>;
7667
8450
  }
7668
- interface RegistrationData<T> {
7669
- id: string;
7670
- registerOptions: T;
8451
+
8452
+ interface ProvideSignatureHelpSignature {
8453
+ (this: void, document: TextDocument$1, position: Position$1, context: SignatureHelpContext, token: CancellationToken$1): ProviderResult<SignatureHelp>;
8454
+ }
8455
+ interface SignatureHelpMiddleware {
8456
+ provideSignatureHelp?: (this: void, document: TextDocument$1, position: Position$1, context: SignatureHelpContext, token: CancellationToken$1, next: ProvideSignatureHelpSignature) => ProviderResult<SignatureHelp>;
8457
+ }
8458
+
8459
+ interface ProvideTypeDefinitionSignature {
8460
+ (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2): ProviderResult<Definition | DefinitionLink[]>;
8461
+ }
8462
+ interface TypeDefinitionMiddleware {
8463
+ provideTypeDefinition?: (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$2, next: ProvideTypeDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
8464
+ }
8465
+
8466
+ declare type WorkspaceFolderMiddleware = {
8467
+ workspaceFolders?: WorkspaceFoldersRequest.MiddlewareSignature;
8468
+ didChangeWorkspaceFolders?: NextSignature<WorkspaceFoldersChangeEvent, Promise<void>>;
8469
+ };
8470
+
8471
+ interface ProvideWorkspaceSymbolsSignature {
8472
+ (this: void, query: string, token: CancellationToken$1): ProviderResult<SymbolInformation[]>;
8473
+ }
8474
+ interface ResolveWorkspaceSymbolSignature {
8475
+ (this: void, item: SymbolInformation, token: CancellationToken$1): ProviderResult<SymbolInformation>;
7671
8476
  }
8477
+ interface WorkspaceSymbolMiddleware {
8478
+ provideWorkspaceSymbols?: (this: void, query: string, token: CancellationToken$1, next: ProvideWorkspaceSymbolsSignature) => ProviderResult<SymbolInformation[]>;
8479
+ resolveWorkspaceSymbol?: (this: void, item: SymbolInformation, token: CancellationToken$1, next: ResolveWorkspaceSymbolSignature) => ProviderResult<SymbolInformation>;
8480
+ }
8481
+
8482
+ declare type PrepareTypeHierarchySignature = (this: void, document: TextDocument$1, position: Position$1, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
8483
+ declare type TypeHierarchySupertypesSignature = (this: void, item: TypeHierarchyItem, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
8484
+ declare type TypeHierarchySubtypesSignature = (this: void, item: TypeHierarchyItem, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
7672
8485
  /**
7673
- * A static feature. A static feature can't be dynamically activate via the
7674
- * server. It is wired during the initialize sequence.
8486
+ * Type hierarchy middleware
8487
+ *
8488
+ * @since 3.17.0
7675
8489
  */
7676
- interface StaticFeature {
8490
+ declare type TypeHierarchyMiddleware = {
8491
+ prepareTypeHierarchy?: (this: void, document: TextDocument$1, positions: Position$1, token: CancellationToken$1, next: PrepareTypeHierarchySignature) => ProviderResult<TypeHierarchyItem[]>;
8492
+ provideTypeHierarchySupertypes?: (this: void, item: TypeHierarchyItem, token: CancellationToken$1, next: TypeHierarchySupertypesSignature) => ProviderResult<TypeHierarchyItem[]>;
8493
+ provideTypeHierarchySubtypes?: (this: void, item: TypeHierarchyItem, token: CancellationToken$1, next: TypeHierarchySubtypesSignature) => ProviderResult<TypeHierarchyItem[]>;
8494
+ };
8495
+
8496
+ /**
8497
+ * Controls when the output channel is revealed.
8498
+ */
8499
+ declare enum RevealOutputChannelOn {
8500
+ Info = 1,
8501
+ Warn = 2,
8502
+ Error = 3,
8503
+ Never = 4
8504
+ }
8505
+ /**
8506
+ * A handler that is invoked when the initialization of the server failed.
8507
+ */
8508
+ declare type InitializationFailedHandler =
8509
+ /**
8510
+ * @param error The error returned from the server
8511
+ * @returns if true is returned the client tries to reinitialize the server.
8512
+ * Implementors of a handler are responsible to not initialize the server
8513
+ * infinitely. Return false if initialization should stop and an error
8514
+ * should be reported.
8515
+ */
8516
+ (error: ResponseError<InitializeError> | Error | any) => boolean;
8517
+ /**
8518
+ * An action to be performed when the connection is producing errors.
8519
+ */
8520
+ declare enum ErrorAction {
7677
8521
  /**
7678
- * Called to fill the initialize params.
7679
- *
7680
- * @params the initialize params.
8522
+ * Continue running the server.
7681
8523
  */
7682
- fillInitializeParams?: (params: InitializeParams) => void;
8524
+ Continue = 1,
7683
8525
  /**
7684
- * Called to fill in the client capabilities this feature implements.
7685
- *
7686
- * @param capabilities The client capabilities to fill.
8526
+ * Shutdown the server.
7687
8527
  */
7688
- fillClientCapabilities(capabilities: ClientCapabilities): void;
8528
+ Shutdown = 2
8529
+ }
8530
+ declare type ErrorHandlerResult = {
7689
8531
  /**
7690
- * Initialize the feature. This method is called on a feature instance
7691
- * when the client has successfully received the initialize request from
7692
- * the server and before the client sends the initialized notification
7693
- * to the server.
7694
- *
7695
- * @param capabilities the server capabilities
7696
- * @param documentSelector the document selector pass to the client's constructor.
7697
- * May be `undefined` if the client was created without a selector.
8532
+ * The action to take.
7698
8533
  */
7699
- initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined): void;
8534
+ action: ErrorAction;
7700
8535
  /**
7701
- * Called when the client is stopped to dispose this feature. Usually a feature
7702
- * un-registers listeners registered hooked up with the VS Code extension host.
8536
+ * An optional message to be presented to the user.
7703
8537
  */
7704
- dispose(): void;
7705
- }
7706
- interface DynamicFeature<RO> {
8538
+ message?: string;
8539
+ };
8540
+ /**
8541
+ * An action to be performed when the connection to a server got closed.
8542
+ */
8543
+ declare enum CloseAction {
7707
8544
  /**
7708
- * Called to fill the initialize params.
7709
- *
7710
- * @params the initialize params.
8545
+ * Don't restart the server. The connection stays closed.
7711
8546
  */
7712
- fillInitializeParams?: (params: InitializeParams) => void;
8547
+ DoNotRestart = 1,
7713
8548
  /**
7714
- * Called to fill in the client capabilities this feature implements.
7715
- *
7716
- * @param capabilities The client capabilities to fill.
8549
+ * Restart the server.
7717
8550
  */
7718
- fillClientCapabilities(capabilities: ClientCapabilities): void;
8551
+ Restart = 2
8552
+ }
8553
+ declare type CloseHandlerResult = {
7719
8554
  /**
7720
- * Initialize the feature. This method is called on a feature instance
7721
- * when the client has successfully received the initialize request from
7722
- * the server and before the client sends the initialized notification
7723
- * to the server.
7724
- *
7725
- * @param capabilities the server capabilities.
7726
- * @param documentSelector the document selector pass to the client's constructor.
7727
- * May be `undefined` if the client was created without a selector.
8555
+ * The action to take.
7728
8556
  */
7729
- initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined): void;
8557
+ action: CloseAction;
7730
8558
  /**
7731
- * The signature (e.g. method) for which this features support dynamic activation / registration.
8559
+ * An optional message to be presented to the user.
7732
8560
  */
7733
- registrationType: RegistrationType<RO>;
8561
+ message?: string;
8562
+ };
8563
+ /**
8564
+ * A plugable error handler that is invoked when the connection is either
8565
+ * producing errors or got closed.
8566
+ */
8567
+ interface ErrorHandler {
7734
8568
  /**
7735
- * Is called when the server send a register request for the given message.
8569
+ * An error has occurred while writing or reading from the connection.
7736
8570
  *
7737
- * @param data additional registration data as defined in the protocol.
8571
+ * @param error - the error received
8572
+ * @param message - the message to be delivered to the server if know.
8573
+ * @param count - a count indicating how often an error is received. Will
8574
+ * be reset if a message got successfully send or received.
7738
8575
  */
7739
- register(data: RegistrationData<RO>): void;
8576
+ error(error: Error, message: Message | undefined, count: number | undefined): ErrorHandlerResult;
7740
8577
  /**
7741
- * Is called when the server wants to unregister a feature.
7742
- *
7743
- * @param id the id used when registering the feature.
8578
+ * The connection to the server got closed.
7744
8579
  */
7745
- unregister(id: string): void;
8580
+ closed(): CloseHandlerResult;
8581
+ }
8582
+ /**
8583
+ * Signals in which state the language client is in.
8584
+ */
8585
+ declare enum State {
7746
8586
  /**
7747
- * Called when the client is stopped to dispose this feature. Usually a feature
7748
- * un-registers listeners registered hooked up with the VS Code extension host.
8587
+ * The client is stopped or got never started.
7749
8588
  */
7750
- dispose(): void;
7751
- }
7752
- interface NotificationFeature<T extends Function> {
8589
+ Stopped = 1,
7753
8590
  /**
7754
- * Triggers the corresponding RPC method.
8591
+ * The client is starting but not ready yet.
7755
8592
  */
7756
- getProvider(document: TextDocument$1): {
7757
- send: T;
7758
- } | undefined;
7759
- }
7760
- interface TextDocumentProviderFeature<T> {
8593
+ Starting = 3,
7761
8594
  /**
7762
- * Triggers the corresponding RPC method.
8595
+ * The client is running and ready.
7763
8596
  */
7764
- getProvider(textDocument: TextDocument$1): T | undefined;
8597
+ Running = 2
7765
8598
  }
7766
- interface WorkspaceProviderFeature<PR> {
7767
- getProviders(): PR[] | undefined;
8599
+ /**
8600
+ * An event signaling a state change.
8601
+ */
8602
+ interface StateChangeEvent {
8603
+ oldState: State;
8604
+ newState: State;
7768
8605
  }
7769
- declare module 'vscode' {
7770
- interface CodeActionProvider<T extends CodeAction = CodeAction> {
7771
- resolveCodeAction?(codeAction: T, token: CancellationToken$1): ProviderResult<T>;
7772
- }
8606
+ interface DidChangeWatchedFileSignature {
8607
+ (this: void, event: FileEvent): Promise<void>;
8608
+ }
8609
+ declare type _WorkspaceMiddleware = {
8610
+ didChangeWatchedFile?: (this: void, event: FileEvent, next: DidChangeWatchedFileSignature) => Promise<void>;
8611
+ };
8612
+ declare type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationMiddleware & DidChangeConfigurationMiddleware & WorkspaceFolderMiddleware & FileOperationsMiddleware;
8613
+ interface _WindowMiddleware {
8614
+ showDocument?: (this: void, params: ShowDocumentParams, next: ShowDocumentRequest.HandlerSignature) => Promise<ShowDocumentResult>;
8615
+ }
8616
+ declare type WindowMiddleware = _WindowMiddleware;
8617
+ interface HandleDiagnosticsSignature {
8618
+ (this: void, uri: Uri, diagnostics: Diagnostic[]): void;
8619
+ }
8620
+ interface HandleWorkDoneProgressSignature {
8621
+ (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd): void;
8622
+ }
8623
+ interface _Middleware {
8624
+ handleDiagnostics?: (this: void, uri: Uri, diagnostics: Diagnostic[], next: HandleDiagnosticsSignature) => void;
8625
+ handleWorkDoneProgress?: (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd, next: HandleWorkDoneProgressSignature) => void;
8626
+ workspace?: WorkspaceMiddleware;
8627
+ window?: WindowMiddleware;
7773
8628
  }
8629
+ /**
8630
+ * The Middleware lets extensions intercept the request and notifications send and received
8631
+ * from the server
8632
+ */
8633
+ declare type Middleware = _Middleware & TextDocumentSynchronizationMiddleware & CompletionMiddleware & HoverMiddleware & DefinitionMiddleware & SignatureHelpMiddleware & DocumentHighlightMiddleware & DocumentSymbolMiddleware & WorkspaceSymbolMiddleware & ReferencesMiddleware & TypeDefinitionMiddleware & ImplementationMiddleware & ColorProviderMiddleware & CodeActionMiddleware & CodeLensMiddleware & FormattingMiddleware & RenameMiddleware & DocumentLinkMiddleware & ExecuteCommandMiddleware & FoldingRangeProviderMiddleware & DeclarationMiddleware & SelectionRangeProviderMiddleware & CallHierarchyMiddleware & SemanticTokensMiddleware & LinkedEditingRangeMiddleware & TypeHierarchyMiddleware & InlineValueMiddleware & InlayHintsMiddleware & NotebookDocumentMiddleware & DiagnosticProviderMiddleware;
8634
+ declare type LanguageClientOptions$1 = {
8635
+ documentSelector?: DocumentSelector$1 | string[];
8636
+ diagnosticCollectionName?: string;
8637
+ outputChannel?: OutputChannel;
8638
+ outputChannelName?: string;
8639
+ traceOutputChannel?: OutputChannel;
8640
+ revealOutputChannelOn?: RevealOutputChannelOn;
8641
+ /**
8642
+ * The encoding use to read stdout and stderr. Defaults
8643
+ * to 'utf8' if omitted.
8644
+ */
8645
+ stdioEncoding?: string;
8646
+ initializationOptions?: any | (() => any);
8647
+ initializationFailedHandler?: InitializationFailedHandler;
8648
+ progressOnInitialization?: boolean;
8649
+ errorHandler?: ErrorHandler;
8650
+ middleware?: Middleware;
8651
+ uriConverters?: {
8652
+ code2Protocol: URIConverter$1;
8653
+ protocol2Code: URIConverter;
8654
+ };
8655
+ workspaceFolder?: WorkspaceFolder;
8656
+ connectionOptions?: {
8657
+ cancellationStrategy: CancellationStrategy;
8658
+ maxRestartCount?: number;
8659
+ };
8660
+ markdown?: {
8661
+ isTrusted?: boolean;
8662
+ supportHtml?: boolean;
8663
+ };
8664
+ } & $NotebookDocumentOptions & $DiagnosticPullOptions & $ConfigurationOptions;
7774
8665
  interface MessageTransports {
7775
8666
  reader: MessageReader;
7776
8667
  writer: MessageWriter;
@@ -7779,23 +8670,30 @@ interface MessageTransports {
7779
8670
  declare namespace MessageTransports {
7780
8671
  function is(value: any): value is MessageTransports;
7781
8672
  }
7782
- declare abstract class BaseLanguageClient {
8673
+ declare abstract class BaseLanguageClient implements FeatureClient<Middleware, LanguageClientOptions$1> {
7783
8674
  private _id;
7784
8675
  private _name;
7785
8676
  private _clientOptions;
7786
8677
  private _state;
7787
- private _onReady;
7788
- private _onReadyCallbacks;
8678
+ private _onStart;
7789
8679
  private _onStop;
7790
- private _connectionPromise;
7791
- private _resolvedConnection;
8680
+ private _connection;
8681
+ private _idleInterval;
8682
+ private readonly _ignoredRegistrations;
8683
+ private readonly _notificationHandlers;
8684
+ private readonly _notificationDisposables;
8685
+ private readonly _pendingNotificationHandlers;
8686
+ private readonly _requestHandlers;
8687
+ private readonly _requestDisposables;
8688
+ private readonly _pendingRequestHandlers;
8689
+ private readonly _progressHandlers;
8690
+ private readonly _pendingProgressHandlers;
8691
+ private readonly _progressDisposables;
7792
8692
  private _initializeResult;
7793
8693
  private _outputChannel;
7794
8694
  private _disposeOutputChannel;
7795
8695
  private _traceOutputChannel;
7796
8696
  private _capabilities;
7797
- private _listeners;
7798
- private _providers;
7799
8697
  private _diagnostics;
7800
8698
  private _syncedDocuments;
7801
8699
  private _fileEvents;
@@ -7805,73 +8703,83 @@ declare abstract class BaseLanguageClient {
7805
8703
  private _trace;
7806
8704
  private _traceFormat;
7807
8705
  private _tracer;
7808
- private _c2p;
7809
- private _p2c;
8706
+ private readonly _c2p;
8707
+ private readonly _p2c;
7810
8708
  constructor(id: string, name: string, clientOptions: LanguageClientOptions$1);
7811
- private get state();
7812
- private set state(value);
7813
- private getPublicState;
7814
- get initializeResult(): InitializeResult | undefined;
7815
- sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken$1): Promise<R>;
7816
- sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken$1): Promise<R>;
7817
- sendRequest<R, E>(type: RequestType0$1<R, E>, token?: CancellationToken$1): Promise<R>;
7818
- sendRequest<P, R, E>(type: RequestType$1<P, R, E>, params: P, token?: CancellationToken$1): Promise<R>;
7819
- sendRequest<R>(method: string, token?: CancellationToken$1): Promise<R>;
7820
- sendRequest<R>(method: string, param: any, token?: CancellationToken$1): Promise<R>;
7821
- onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0$1<R, E>): Disposable$1;
7822
- onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler$1<P, R, E>): Disposable$1;
7823
- onRequest<R, E>(type: RequestType0$1<R, E>, handler: RequestHandler0$1<R, E>): Disposable$1;
7824
- onRequest<P, R, E>(type: RequestType$1<P, R, E>, handler: RequestHandler$1<P, R, E>): Disposable$1;
7825
- onRequest<R, E>(method: string, handler: GenericRequestHandler$1<R, E>): Disposable$1;
7826
- sendNotification<RO>(type: ProtocolNotificationType0<RO>): void;
7827
- sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): void;
7828
- sendNotification(type: NotificationType0$1): void;
7829
- sendNotification<P>(type: NotificationType$1<P>, params?: P): void;
7830
- sendNotification(method: string): void;
7831
- sendNotification(method: string, params: any): void;
7832
- onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0$1): Disposable$1;
7833
- onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler$1<P>): Disposable$1;
7834
- onNotification(type: NotificationType0$1, handler: NotificationHandler0$1): Disposable$1;
7835
- onNotification<P>(type: NotificationType$1<P>, handler: NotificationHandler$1<P>): Disposable$1;
7836
- onNotification(method: string, handler: GenericNotificationHandler$1): Disposable$1;
7837
- onProgress<P>(type: ProgressType$1<P>, token: string | number, handler: NotificationHandler$1<P>): Disposable$1;
7838
- sendProgress<P>(type: ProgressType$1<P>, token: string | number, value: P): void;
8709
+ get name(): string;
8710
+ get middleware(): Middleware;
7839
8711
  get clientOptions(): LanguageClientOptions$1;
7840
8712
  get protocol2CodeConverter(): Converter;
7841
8713
  get code2ProtocolConverter(): Converter$1;
7842
8714
  get onTelemetry(): Event$2<any>;
7843
8715
  get onDidChangeState(): Event$2<StateChangeEvent>;
7844
- get outputChannel(): OutputChannel$1;
7845
- get traceOutputChannel(): OutputChannel$1;
8716
+ get outputChannel(): OutputChannel;
8717
+ get traceOutputChannel(): OutputChannel;
7846
8718
  get diagnostics(): DiagnosticCollection | undefined;
8719
+ get state(): State;
8720
+ private get $state();
8721
+ private set $state(value);
8722
+ private getPublicState;
8723
+ get initializeResult(): InitializeResult | undefined;
8724
+ sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken$1): Promise<R>;
8725
+ sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken$1): Promise<R>;
8726
+ sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken$1): Promise<R>;
8727
+ sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken$1): Promise<R>;
8728
+ sendRequest<R>(method: string, token?: CancellationToken$1): Promise<R>;
8729
+ sendRequest<R>(method: string, param: any, token?: CancellationToken$1): Promise<R>;
8730
+ onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable$1;
8731
+ onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable$1;
8732
+ onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable$1;
8733
+ onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable$1;
8734
+ onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable$1;
8735
+ sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
8736
+ sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
8737
+ sendNotification(type: NotificationType0): Promise<void>;
8738
+ sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
8739
+ sendNotification(method: string): Promise<void>;
8740
+ sendNotification(method: string, params: any): Promise<void>;
8741
+ onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable$1;
8742
+ onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable$1;
8743
+ onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable$1;
8744
+ onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable$1;
8745
+ onNotification(method: string, handler: GenericNotificationHandler): Disposable$1;
8746
+ sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
8747
+ onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable$1;
7847
8748
  createDefaultErrorHandler(maxRestartCount?: number): ErrorHandler;
7848
- set trace(value: Trace$1);
8749
+ setTrace(value: Trace): Promise<void>;
7849
8750
  private data2String;
7850
8751
  info(message: string, data?: any, showNotification?: boolean): void;
7851
8752
  warn(message: string, data?: any, showNotification?: boolean): void;
7852
- error(message: string, data?: any, showNotification?: boolean): void;
8753
+ error(message: string, data?: any, showNotification?: boolean | 'force'): void;
7853
8754
  private showNotificationMessage;
7854
8755
  private logTrace;
7855
8756
  private logObjectTrace;
7856
8757
  needsStart(): boolean;
7857
8758
  needsStop(): boolean;
7858
- onReady(): Promise<void>;
7859
- private isConnectionActive;
7860
- start(): Disposable$1;
7861
- private resolveConnection;
8759
+ private activeConnection;
8760
+ isRunning(): boolean;
8761
+ start(): Promise<void>;
8762
+ private createOnStartPromise;
7862
8763
  private initialize;
7863
8764
  private doInitialize;
7864
8765
  private _clientGetRootPath;
7865
- stop(): Promise<void>;
8766
+ stop(timeout?: number): Promise<void>;
8767
+ suspend(): Promise<void>;
8768
+ private shutdown;
7866
8769
  private cleanUp;
7867
8770
  private cleanUpChannel;
7868
8771
  private notifyFileEvent;
7869
8772
  private _didChangeTextDocumentFeature;
7870
8773
  private forceDocumentSync;
8774
+ private _diagnosticQueue;
8775
+ private _diagnosticQueueState;
7871
8776
  private handleDiagnostics;
8777
+ private triggerDiagnosticQueue;
8778
+ private workDiagnosticQueue;
7872
8779
  private setDiagnostics;
7873
8780
  protected abstract getLocale(): string;
7874
8781
  protected abstract createMessageTransports(encoding: string): Promise<MessageTransports>;
8782
+ private $start;
7875
8783
  private createConnection;
7876
8784
  protected handleConnectionClosed(): void;
7877
8785
  private handleConnectionError;
@@ -7882,12 +8790,12 @@ declare abstract class BaseLanguageClient {
7882
8790
  private readonly _dynamicFeatures;
7883
8791
  registerFeatures(features: (StaticFeature | DynamicFeature<any>)[]): void;
7884
8792
  registerFeature(feature: StaticFeature | DynamicFeature<any>): void;
7885
- getFeature(request: typeof DidOpenTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => void>;
7886
- getFeature(request: typeof DidChangeTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => void>;
7887
- getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => void>;
7888
- getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => ProviderResult<TextEdit$1[]>>;
7889
- getFeature(request: typeof DidSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => void>;
7890
- getFeature(request: typeof DidCloseTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & NotificationFeature<(textDocument: TextDocument$1) => void>;
8793
+ getFeature(request: typeof DidOpenTextDocumentNotification.method): DidOpenTextDocumentFeatureShape;
8794
+ getFeature(request: typeof DidChangeTextDocumentNotification.method): DidChangeTextDocumentFeatureShape;
8795
+ getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument$1) => Promise<void>>;
8796
+ getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument$1) => ProviderResult<TextEdit$1[]>>;
8797
+ getFeature(request: typeof DidSaveTextDocumentNotification.method): DidSaveTextDocumentFeatureShape;
8798
+ getFeature(request: typeof DidCloseTextDocumentNotification.method): DidCloseTextDocumentFeatureShape;
7891
8799
  getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
7892
8800
  send: (event: FileCreateEvent) => Promise<void>;
7893
8801
  };
@@ -7913,6 +8821,7 @@ declare abstract class BaseLanguageClient {
7913
8821
  getFeature(request: typeof ReferencesRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ReferenceProvider>;
7914
8822
  getFeature(request: typeof DocumentHighlightRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentHighlightProvider>;
7915
8823
  getFeature(request: typeof CodeActionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeActionProvider>;
8824
+ getFeature(request: typeof CodeLensRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeLensProviderShape>;
7916
8825
  getFeature(request: typeof DocumentFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentFormattingEditProvider>;
7917
8826
  getFeature(request: typeof DocumentRangeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentRangeFormattingEditProvider>;
7918
8827
  getFeature(request: typeof DocumentOnTypeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<OnTypeFormattingEditProvider>;
@@ -7926,29 +8835,37 @@ declare abstract class BaseLanguageClient {
7926
8835
  getFeature(request: typeof SelectionRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SelectionRangeProvider>;
7927
8836
  getFeature(request: typeof TypeDefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeDefinitionProvider>;
7928
8837
  getFeature(request: typeof CallHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CallHierarchyProvider>;
7929
- getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviders>;
8838
+ getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviderShape>;
7930
8839
  getFeature(request: typeof LinkedEditingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<LinkedEditingRangeProvider>;
8840
+ getFeature(request: typeof TypeHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeHierarchyProvider>;
8841
+ getFeature(request: typeof InlineValueRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlineValueProviderShape>;
8842
+ getFeature(request: typeof InlayHintRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlayHintsProviderShape>;
7931
8843
  getFeature(request: typeof WorkspaceSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & WorkspaceProviderFeature<WorkspaceSymbolProvider>;
8844
+ getFeature(request: typeof DocumentDiagnosticRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DiagnosticProviderShape> | undefined;
8845
+ getFeature(request: typeof NotebookDocumentSyncRegistrationType.method): DynamicFeature<NotebookDocumentSyncRegistrationOptions> & NotebookDocumentProviderShape | undefined;
8846
+ hasDedicatedTextSynchronizationFeature(textDocument: TextDocument$1): boolean;
7932
8847
  protected registerBuiltinFeatures(): void;
8848
+ registerProposedFeatures(): void;
7933
8849
  protected fillInitializeParams(params: InitializeParams): void;
7934
8850
  private computeClientCapabilities;
7935
8851
  private initializeFeatures;
7936
8852
  private handleRegistrationRequest;
7937
8853
  private handleUnregistrationRequest;
8854
+ private workspaceEditLock;
7938
8855
  private handleApplyWorkspaceEdit;
7939
- handleFailedRequest<T>(type: MessageSignature$1, error: any, defaultValue: T): T;
7940
- private static Canceled;
7941
- private makeCancelError;
8856
+ private static RequestsToCancelOnContentModified;
8857
+ handleFailedRequest<T>(type: MessageSignature, token: CancellationToken$1 | undefined, error: any, defaultValue: T, showNotification?: boolean): T;
8858
+ }
8859
+
8860
+ interface IConnectionProvider {
8861
+ get(encoding: string): Promise<MessageTransports>;
7942
8862
  }
7943
8863
 
7944
8864
  declare class MonacoLanguageClient extends BaseLanguageClient {
7945
- static bypassConversion: (result: any) => any;
8865
+ static bypassConversion: (result: any, token?: CancellationToken$1 | undefined) => any;
7946
8866
  protected readonly connectionProvider: IConnectionProvider;
7947
8867
  constructor({ id, name, clientOptions, connectionProvider }: MonacoLanguageClient.Options);
7948
- protected doCreateConnection(): Thenable<IConnection>;
7949
8868
  protected createMessageTransports(encoding: string): Promise<MessageTransports>;
7950
- protected registerBuiltinFeatures(): void;
7951
- registerProposedFeatures(): void;
7952
8869
  protected getLocale(): string;
7953
8870
  }
7954
8871
  declare namespace MonacoLanguageClient {
@@ -7988,8 +8905,8 @@ declare function registerLanguageClient(id: string, options: LanguageClientOptio
7988
8905
  declare type LanguageClientId = StaticLanguageClientId | string;
7989
8906
 
7990
8907
  interface LanguageClient {
7991
- sendNotification<P>(type: NotificationType$2<P>, params?: P): void;
7992
- sendRequest<P, R, E>(request: RequestType$2<P, R, E>, params: P, token?: CancellationToken): Promise<R>;
8908
+ sendNotification<P>(type: NotificationType$1<P>, params?: P): void;
8909
+ sendRequest<P, R, E>(request: RequestType$1<P, R, E>, params: P, token?: CancellationToken): Promise<R>;
7993
8910
  }
7994
8911
  declare type Status = 'ready' | 'error' | 'connecting' | 'connected' | 'closed';
7995
8912
  interface StatusChangeEvent {
@@ -7997,7 +8914,7 @@ interface StatusChangeEvent {
7997
8914
  }
7998
8915
  declare class LanguageClientManager implements LanguageClient {
7999
8916
  private id;
8000
- private languageServerOptions;
8917
+ private clientOptions;
8001
8918
  private infrastructure;
8002
8919
  languageClient?: MonacoLanguageClient;
8003
8920
  private disposed;
@@ -8007,7 +8924,7 @@ declare class LanguageClientManager implements LanguageClient {
8007
8924
  protected readonly onWillShutdownEmitter: Emitter<WillShutdownParams>;
8008
8925
  protected currentStatus: Status;
8009
8926
  private useMutualizedProxy;
8010
- constructor(id: LanguageClientId, languageServerOptions: LanguageClientOptions, infrastructure: Infrastructure);
8927
+ constructor(id: LanguageClientId, clientOptions: LanguageClientOptions, infrastructure: Infrastructure);
8011
8928
  private updateStatus;
8012
8929
  private notifyStatusChanged;
8013
8930
  isConnected(): boolean;
@@ -8022,8 +8939,8 @@ declare class LanguageClientManager implements LanguageClient {
8022
8939
  private handleError;
8023
8940
  start(): Promise<void>;
8024
8941
  private _start;
8025
- sendNotification<P>(type: NotificationType$2<P>, params?: P): void;
8026
- sendRequest<P, R, E>(type: RequestType$2<P, R, E>, params: P): Promise<R>;
8942
+ sendNotification<P>(type: NotificationType$1<P>, params?: P): Promise<void>;
8943
+ sendRequest<P, R, E>(type: RequestType$1<P, R, E>, params: P): Promise<R>;
8027
8944
  }
8028
8945
  /**
8029
8946
  * Create a language client manager
@@ -8031,7 +8948,7 @@ declare class LanguageClientManager implements LanguageClient {
8031
8948
  * @param infrastructure The infrastructure to use
8032
8949
  * @returns A language client manager
8033
8950
  */
8034
- declare function createLanguageClientManager(id: LanguageClientId, infrastructure: Infrastructure): LanguageClientManager;
8951
+ declare function createLanguageClientManager(id: LanguageClientId, infrastructure: Infrastructure, clientOptions?: LanguageClientOptions): LanguageClientManager;
8035
8952
 
8036
8953
  interface Infrastructure {
8037
8954
  /**
@@ -8069,7 +8986,7 @@ interface Infrastructure {
8069
8986
  * Open a connection to the language server
8070
8987
  * @param id The language server id
8071
8988
  */
8072
- openConnection(id: LanguageClientId): Promise<MessageConnection>;
8989
+ openConnection(id: LanguageClientId): Promise<MessageTransports>;
8073
8990
  }
8074
8991
  declare abstract class CodinGameInfrastructure implements Infrastructure {
8075
8992
  /**
@@ -8108,7 +9025,7 @@ declare abstract class CodinGameInfrastructure implements Infrastructure {
8108
9025
  * A function which returns a valid JWT token to use to connect to the server
8109
9026
  */
8110
9027
  protected abstract getSecurityToken(): Promise<string>;
8111
- openConnection(id: LanguageClientId): Promise<MessageConnection>;
9028
+ openConnection(id: LanguageClientId): Promise<MessageTransports>;
8112
9029
  }
8113
9030
 
8114
9031
  /**