@codingame/monaco-languageclient-wrapper 3.0.0 → 3.0.3

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 +1447 -16
  2. package/dist/index.js +16628 -662
  3. package/package.json +10 -9
  4. package/stats.html +1 -1
package/dist/index.d.ts CHANGED
@@ -1,16 +1,1447 @@
1
- import { BaseLanguageClient, MessageTransports, LanguageClientOptions as LanguageClientOptions$1 } from 'vscode-languageclient/lib/common/client';
2
- export { MessageTransports } from 'vscode-languageclient/lib/common/client';
3
- import * as vscode from 'vscode';
1
+ import * as code from 'vscode';
2
+ import { TextDocument, TextDocumentChangeEvent, TextDocumentWillSaveEvent, TextEdit, ProviderResult, CodeLens, CodeLensProvider, EventEmitter, Range, InlineValueContext, InlineValue, InlineValuesProvider, InlayHint, InlayHintsProvider, Uri, CancellationToken as CancellationToken$1, Diagnostic, Event, Disposable as Disposable$1, FileCreateEvent, FileRenameEvent, FileDeleteEvent, FileWillCreateEvent, FileWillRenameEvent, FileWillDeleteEvent, CompletionItemProvider, HoverProvider, SignatureHelpProvider, DefinitionProvider, ReferenceProvider, DocumentHighlightProvider, CodeActionProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, RenameProvider, DocumentSymbolProvider, DocumentLinkProvider, DocumentColorProvider, DeclarationProvider, FoldingRangeProvider, ImplementationProvider, SelectionRangeProvider, TypeDefinitionProvider, CallHierarchyProvider, LinkedEditingRangeProvider, TypeHierarchyProvider, WorkspaceSymbolProvider, WorkspaceFolder, FileSystemWatcher, Position, CompletionContext, CompletionItem, CompletionList, Hover, Definition, DefinitionLink, SignatureHelpContext, SignatureHelp, DocumentHighlight, SymbolInformation, DocumentSymbol, Location, ColorInformation, Color, ColorPresentation, CodeActionContext, Command, CodeAction, FormattingOptions, WorkspaceEdit, DocumentLink, FoldingContext, FoldingRange, Declaration, SelectionRange, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall, TypeHierarchyItem, WorkspaceFoldersChangeEvent, OutputChannel, DiagnosticCollection } from 'vscode';
4
3
  export { WorkspaceFolder } from 'vscode';
4
+ import * as ls from 'vscode-languageserver-protocol';
5
+ import { TextDocumentRegistrationOptions, DidOpenTextDocumentParams, DidCloseTextDocumentParams, TextDocumentChangeRegistrationOptions, DidChangeTextDocumentParams, DidSaveTextDocumentParams, CancellationToken, DocumentSelector, 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, MessageReader, MessageWriter, CancellationStrategy, ResponseError, InitializeError, Message, Event as Event$1, InitializeResult, Trace, ProgressToken, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, FileEvent, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, Emitter, TextDocumentSaveReason } from 'vscode-languageserver-protocol';
5
6
  import * as monaco from 'monaco-editor';
6
- import { Emitter, Event, NotificationType, RequestType, CancellationToken, TextDocumentSaveReason } from 'vscode-languageserver-protocol';
7
- import { Disposable } from 'vscode-jsonrpc/lib/common/api';
7
+
8
+ interface Disposable {
9
+ /**
10
+ * Dispose this object.
11
+ */
12
+ dispose(): void;
13
+ }
14
+ declare namespace Disposable {
15
+ function create(func: () => void): Disposable;
16
+ }
17
+
18
+ interface FileFormattingOptions {
19
+ trimTrailingWhitespace?: boolean;
20
+ trimFinalNewlines?: boolean;
21
+ insertFinalNewline?: boolean;
22
+ }
23
+ interface Converter$1 {
24
+ asUri(uri: code.Uri): string;
25
+ asTextDocumentItem(textDocument: code.TextDocument): ls.TextDocumentItem;
26
+ asTextDocumentIdentifier(textDocument: code.TextDocument): ls.TextDocumentIdentifier;
27
+ asVersionedTextDocumentIdentifier(textDocument: code.TextDocument): ls.VersionedTextDocumentIdentifier;
28
+ asOpenTextDocumentParams(textDocument: code.TextDocument): ls.DidOpenTextDocumentParams;
29
+ asChangeTextDocumentParams(textDocument: code.TextDocument): ls.DidChangeTextDocumentParams;
30
+ asChangeTextDocumentParams(event: code.TextDocumentChangeEvent): ls.DidChangeTextDocumentParams;
31
+ asCloseTextDocumentParams(textDocument: code.TextDocument): ls.DidCloseTextDocumentParams;
32
+ asSaveTextDocumentParams(textDocument: code.TextDocument, includeContent?: boolean): ls.DidSaveTextDocumentParams;
33
+ asWillSaveTextDocumentParams(event: code.TextDocumentWillSaveEvent): ls.WillSaveTextDocumentParams;
34
+ asDidCreateFilesParams(event: code.FileCreateEvent): ls.CreateFilesParams;
35
+ asDidRenameFilesParams(event: code.FileRenameEvent): ls.RenameFilesParams;
36
+ asDidDeleteFilesParams(event: code.FileDeleteEvent): ls.DeleteFilesParams;
37
+ asWillCreateFilesParams(event: code.FileCreateEvent): ls.CreateFilesParams;
38
+ asWillRenameFilesParams(event: code.FileRenameEvent): ls.RenameFilesParams;
39
+ asWillDeleteFilesParams(event: code.FileDeleteEvent): ls.DeleteFilesParams;
40
+ asTextDocumentPositionParams(textDocument: code.TextDocument, position: code.Position): ls.TextDocumentPositionParams;
41
+ asCompletionParams(textDocument: code.TextDocument, position: code.Position, context: code.CompletionContext): ls.CompletionParams;
42
+ asSignatureHelpParams(textDocument: code.TextDocument, position: code.Position, context: code.SignatureHelpContext): ls.SignatureHelpParams;
43
+ asWorkerPosition(position: code.Position): ls.Position;
44
+ asPosition(value: null): null;
45
+ asPosition(value: undefined): undefined;
46
+ asPosition(value: code.Position): ls.Position;
47
+ asPosition(value: code.Position | undefined | null): ls.Position | undefined | null;
48
+ asPositions(value: readonly code.Position[], token?: code.CancellationToken): Promise<ls.Position[]>;
49
+ asRange(value: null): null;
50
+ asRange(value: undefined): undefined;
51
+ asRange(value: code.Range): ls.Range;
52
+ asRange(value: code.Range | undefined | null): ls.Range | undefined | null;
53
+ asLocation(value: null): null;
54
+ asLocation(value: undefined): undefined;
55
+ asLocation(value: code.Location): ls.Location;
56
+ asLocation(value: code.Location | undefined | null): ls.Location | undefined | null;
57
+ asDiagnosticSeverity(value: code.DiagnosticSeverity): number;
58
+ asDiagnosticTag(value: code.DiagnosticTag): number | undefined;
59
+ asDiagnostic(item: code.Diagnostic): ls.Diagnostic;
60
+ asDiagnostics(items: code.Diagnostic[], token?: code.CancellationToken): Promise<ls.Diagnostic[]>;
61
+ asCompletionItem(item: code.CompletionItem, labelDetailsSupport?: boolean): ls.CompletionItem;
62
+ asSymbolKind(item: code.SymbolKind): ls.SymbolKind;
63
+ asSymbolTag(item: code.SymbolTag): ls.SymbolTag;
64
+ asSymbolTags(items: ReadonlyArray<code.SymbolTag>): ls.SymbolTag[];
65
+ asTextEdit(edit: code.TextEdit): ls.TextEdit;
66
+ asReferenceParams(textDocument: code.TextDocument, position: code.Position, options: {
67
+ includeDeclaration: boolean;
68
+ }): ls.ReferenceParams;
69
+ asCodeAction(item: code.CodeAction, token?: code.CancellationToken): Promise<ls.CodeAction>;
70
+ asCodeActionContext(context: code.CodeActionContext, token?: code.CancellationToken): Promise<ls.CodeActionContext>;
71
+ asInlineValueContext(context: code.InlineValueContext): ls.InlineValueContext;
72
+ asCommand(item: code.Command): ls.Command;
73
+ asCodeLens(item: code.CodeLens): ls.CodeLens;
74
+ asFormattingOptions(options: code.FormattingOptions, fileOptions: FileFormattingOptions): ls.FormattingOptions;
75
+ asDocumentSymbolParams(textDocument: code.TextDocument): ls.DocumentSymbolParams;
76
+ asCodeLensParams(textDocument: code.TextDocument): ls.CodeLensParams;
77
+ asDocumentLink(item: code.DocumentLink): ls.DocumentLink;
78
+ asDocumentLinkParams(textDocument: code.TextDocument): ls.DocumentLinkParams;
79
+ asCallHierarchyItem(value: code.CallHierarchyItem): ls.CallHierarchyItem;
80
+ asTypeHierarchyItem(value: code.TypeHierarchyItem): ls.TypeHierarchyItem;
81
+ asWorkspaceSymbol(item: code.SymbolInformation): ls.WorkspaceSymbol;
82
+ asInlayHint(value: code.InlayHint): ls.InlayHint;
83
+ }
84
+ interface URIConverter$1 {
85
+ (value: code.Uri): string;
86
+ }
87
+
88
+ declare class ProtocolCompletionItem extends code.CompletionItem {
89
+ data: any;
90
+ fromEdit: boolean | undefined;
91
+ documentationFormat: string | undefined;
92
+ originalItemKind: ls.CompletionItemKind | undefined;
93
+ deprecated: boolean | undefined;
94
+ insertTextMode: ls.InsertTextMode | undefined;
95
+ constructor(label: string | code.CompletionItemLabel);
96
+ }
97
+
98
+ interface Converter {
99
+ asUri(value: string): code.Uri;
100
+ asDocumentSelector(value: ls.DocumentSelector): code.DocumentSelector;
101
+ asPosition(value: undefined | null): undefined;
102
+ asPosition(value: ls.Position): code.Position;
103
+ asPosition(value: ls.Position | undefined | null): code.Position | undefined;
104
+ asRange(value: undefined | null): undefined;
105
+ asRange(value: ls.Range): code.Range;
106
+ asRange(value: ls.Range | undefined | null): code.Range | undefined;
107
+ asRanges(items: ReadonlyArray<ls.Range>, token?: code.CancellationToken): Promise<code.Range[]>;
108
+ asDiagnostic(diagnostic: ls.Diagnostic): code.Diagnostic;
109
+ asDiagnostics(diagnostics: ls.Diagnostic[], token?: code.CancellationToken): Promise<code.Diagnostic[]>;
110
+ asDiagnosticSeverity(value: number | undefined | null): code.DiagnosticSeverity;
111
+ asDiagnosticTag(tag: ls.DiagnosticTag): code.DiagnosticTag | undefined;
112
+ asHover(hover: undefined | null): undefined;
113
+ asHover(hover: ls.Hover): code.Hover;
114
+ asHover(hover: ls.Hover | undefined | null): code.Hover | undefined;
115
+ asCompletionResult(value: undefined | null, allCommitCharacters?: string[], token?: code.CancellationToken): Promise<undefined>;
116
+ asCompletionResult(value: ls.CompletionList, allCommitCharacters?: string[], token?: code.CancellationToken): Promise<code.CompletionList>;
117
+ asCompletionResult(value: ls.CompletionItem[], allCommitCharacters?: string[], token?: code.CancellationToken): Promise<code.CompletionItem[]>;
118
+ asCompletionResult(value: ls.CompletionItem[] | ls.CompletionList | undefined | null, allCommitCharacters?: string[], token?: code.CancellationToken): Promise<code.CompletionItem[] | code.CompletionList | undefined>;
119
+ asCompletionItem(item: ls.CompletionItem, defaultCommitCharacters?: string[]): ProtocolCompletionItem;
120
+ asTextEdit(edit: undefined | null): undefined;
121
+ asTextEdit(edit: ls.TextEdit): code.TextEdit;
122
+ asTextEdit(edit: ls.TextEdit | undefined | null): code.TextEdit | undefined;
123
+ asTextEdits(items: undefined | null, token?: code.CancellationToken): Promise<undefined>;
124
+ asTextEdits(items: ls.TextEdit[], token?: code.CancellationToken): Promise<code.TextEdit[]>;
125
+ asTextEdits(items: ls.TextEdit[] | undefined | null, token?: code.CancellationToken): Promise<code.TextEdit[] | undefined>;
126
+ asSignatureHelp(item: undefined | null, token?: code.CancellationToken): Promise<undefined>;
127
+ asSignatureHelp(item: ls.SignatureHelp, token?: code.CancellationToken): Promise<code.SignatureHelp>;
128
+ asSignatureHelp(item: ls.SignatureHelp | undefined | null, token?: code.CancellationToken): Promise<code.SignatureHelp | undefined>;
129
+ asSignatureInformation(item: ls.SignatureInformation, token?: code.CancellationToken): Promise<code.SignatureInformation>;
130
+ asSignatureInformations(items: ls.SignatureInformation[], token?: code.CancellationToken): Promise<code.SignatureInformation[]>;
131
+ asParameterInformation(item: ls.ParameterInformation): code.ParameterInformation;
132
+ asParameterInformations(item: ls.ParameterInformation[], token?: code.CancellationToken): Promise<code.ParameterInformation[]>;
133
+ asLocation(item: ls.Location): code.Location;
134
+ asLocation(item: undefined | null): undefined;
135
+ asLocation(item: ls.Location | undefined | null): code.Location | undefined;
136
+ asDeclarationResult(item: undefined | null, token?: code.CancellationToken): Promise<undefined>;
137
+ asDeclarationResult(item: ls.Declaration, token?: code.CancellationToken): Promise<code.Location | code.Location[]>;
138
+ asDeclarationResult(item: ls.DeclarationLink[], token?: code.CancellationToken): Promise<code.LocationLink[]>;
139
+ asDeclarationResult(item: ls.Declaration | ls.DeclarationLink[] | undefined | null, token?: code.CancellationToken): Promise<code.Declaration | undefined>;
140
+ asDefinitionResult(item: undefined | null, token?: code.CancellationToken): Promise<undefined>;
141
+ asDefinitionResult(item: ls.Definition, token?: code.CancellationToken): Promise<code.Definition>;
142
+ asDefinitionResult(item: ls.DefinitionLink[], token?: code.CancellationToken): Promise<code.DefinitionLink[]>;
143
+ asDefinitionResult(item: ls.Definition | ls.DefinitionLink[] | undefined | null, token?: code.CancellationToken): Promise<code.Definition | code.DefinitionLink[] | undefined>;
144
+ asReferences(values: undefined | null, token?: code.CancellationToken): Promise<undefined>;
145
+ asReferences(values: ls.Location[], token?: code.CancellationToken): Promise<code.Location[]>;
146
+ asReferences(values: ls.Location[] | undefined | null, token?: code.CancellationToken): Promise<code.Location[] | undefined>;
147
+ asDocumentHighlightKind(item: number): code.DocumentHighlightKind;
148
+ asDocumentHighlight(item: ls.DocumentHighlight): code.DocumentHighlight;
149
+ asDocumentHighlights(values: undefined | null, token?: code.CancellationToken): Promise<undefined>;
150
+ asDocumentHighlights(values: ls.DocumentHighlight[], token?: code.CancellationToken): Promise<code.DocumentHighlight[]>;
151
+ asDocumentHighlights(values: ls.DocumentHighlight[] | undefined | null, token?: code.CancellationToken): Promise<code.DocumentHighlight[] | undefined>;
152
+ asSymbolKind(item: ls.SymbolKind): code.SymbolKind;
153
+ asSymbolTag(item: ls.SymbolTag): code.SymbolTag | undefined;
154
+ asSymbolTags(items: undefined | null): undefined;
155
+ asSymbolTags(items: ReadonlyArray<ls.SymbolTag>): code.SymbolTag[];
156
+ asSymbolTags(items: ReadonlyArray<ls.SymbolTag> | undefined | null): code.SymbolTag[] | undefined;
157
+ asSymbolInformation(item: ls.SymbolInformation | ls.WorkspaceSymbol): code.SymbolInformation;
158
+ asSymbolInformations(values: undefined | null, token?: code.CancellationToken): Promise<undefined>;
159
+ asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[], token?: code.CancellationToken): Promise<code.SymbolInformation[]>;
160
+ asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[] | undefined | null, token?: code.CancellationToken): Promise<code.SymbolInformation[] | undefined>;
161
+ asDocumentSymbol(value: ls.DocumentSymbol, token?: code.CancellationToken): code.DocumentSymbol;
162
+ asDocumentSymbols(value: undefined | null, token?: code.CancellationToken): Promise<undefined>;
163
+ asDocumentSymbols(value: ls.DocumentSymbol[], token?: code.CancellationToken): Promise<code.DocumentSymbol[]>;
164
+ asDocumentSymbols(value: ls.DocumentSymbol[] | undefined | null, token?: code.CancellationToken): Promise<code.DocumentSymbol[] | undefined>;
165
+ asCommand(item: ls.Command): code.Command;
166
+ asCommands(items: undefined | null, token?: code.CancellationToken): Promise<undefined>;
167
+ asCommands(items: ls.Command[], token?: code.CancellationToken): Promise<code.Command[]>;
168
+ asCommands(items: ls.Command[] | undefined | null, token?: code.CancellationToken): Promise<code.Command[] | undefined>;
169
+ asCodeAction(item: undefined | null, token?: code.CancellationToken): Promise<undefined>;
170
+ asCodeAction(item: ls.CodeAction, token?: code.CancellationToken): Promise<code.CodeAction>;
171
+ asCodeAction(item: ls.CodeAction | undefined | null, token?: code.CancellationToken): Promise<code.CodeAction | undefined>;
172
+ asCodeActionKind(item: null | undefined): undefined;
173
+ asCodeActionKind(item: ls.CodeActionKind): code.CodeActionKind;
174
+ asCodeActionKind(item: ls.CodeActionKind | null | undefined): code.CodeActionKind | undefined;
175
+ asCodeActionKinds(item: null | undefined): undefined;
176
+ asCodeActionKinds(items: ls.CodeActionKind[]): code.CodeActionKind[];
177
+ asCodeActionKinds(item: ls.CodeActionKind[] | null | undefined): code.CodeActionKind[] | undefined;
178
+ asCodeActionResult(items: (ls.Command | ls.CodeAction)[], token?: code.CancellationToken): Promise<(code.Command | code.CodeAction)[]>;
179
+ asCodeLens(item: ls.CodeLens): code.CodeLens;
180
+ asCodeLens(item: undefined | null): undefined;
181
+ asCodeLens(item: ls.CodeLens | undefined | null): code.CodeLens | undefined;
182
+ asCodeLenses(items: undefined | null, token?: code.CancellationToken): Promise<undefined>;
183
+ asCodeLenses(items: ls.CodeLens[], token?: code.CancellationToken): Promise<code.CodeLens[]>;
184
+ asCodeLenses(items: ls.CodeLens[] | undefined | null, token?: code.CancellationToken): Promise<code.CodeLens[] | undefined>;
185
+ asWorkspaceEdit(item: undefined | null, token?: code.CancellationToken): Promise<undefined>;
186
+ asWorkspaceEdit(item: ls.WorkspaceEdit, token?: code.CancellationToken): Promise<code.WorkspaceEdit>;
187
+ asWorkspaceEdit(item: ls.WorkspaceEdit | undefined | null, token?: code.CancellationToken): Promise<code.WorkspaceEdit | undefined>;
188
+ asDocumentLink(item: ls.DocumentLink): code.DocumentLink;
189
+ asDocumentLinks(items: undefined | null, token?: code.CancellationToken): Promise<undefined>;
190
+ asDocumentLinks(items: ls.DocumentLink[], token?: code.CancellationToken): Promise<code.DocumentLink[]>;
191
+ asDocumentLinks(items: ls.DocumentLink[] | undefined | null, token?: code.CancellationToken): Promise<code.DocumentLink[] | undefined>;
192
+ asColor(color: ls.Color): code.Color;
193
+ asColorInformation(ci: ls.ColorInformation): code.ColorInformation;
194
+ asColorInformations(colorPresentations: undefined | null, token?: code.CancellationToken): Promise<undefined>;
195
+ asColorInformations(colorPresentations: ls.ColorInformation[], token?: code.CancellationToken): Promise<code.ColorInformation[]>;
196
+ asColorInformations(colorInformation: ls.ColorInformation[] | undefined | null, token?: code.CancellationToken): Promise<code.ColorInformation[]>;
197
+ asColorPresentation(cp: ls.ColorPresentation): code.ColorPresentation;
198
+ asColorPresentations(colorPresentations: undefined | null, token?: code.CancellationToken): Promise<undefined>;
199
+ asColorPresentations(colorPresentations: ls.ColorPresentation[], token?: code.CancellationToken): Promise<code.ColorPresentation[]>;
200
+ asColorPresentations(colorPresentations: ls.ColorPresentation[] | undefined | null, token?: code.CancellationToken): Promise<code.ColorPresentation[] | undefined>;
201
+ asFoldingRangeKind(kind: string | undefined): code.FoldingRangeKind | undefined;
202
+ asFoldingRange(r: ls.FoldingRange): code.FoldingRange;
203
+ asFoldingRanges(foldingRanges: undefined | null, token?: code.CancellationToken): Promise<undefined>;
204
+ asFoldingRanges(foldingRanges: ls.FoldingRange[], token?: code.CancellationToken): Promise<code.FoldingRange[]>;
205
+ asFoldingRanges(foldingRanges: ls.FoldingRange[] | undefined | null, token?: code.CancellationToken): Promise<code.FoldingRange[] | undefined>;
206
+ asSelectionRange(selectionRange: ls.SelectionRange): code.SelectionRange;
207
+ asSelectionRanges(selectionRanges: undefined | null, token?: code.CancellationToken): Promise<undefined>;
208
+ asSelectionRanges(selectionRanges: ls.SelectionRange[], token?: code.CancellationToken): Promise<code.SelectionRange[]>;
209
+ asSelectionRanges(selectionRanges: ls.SelectionRange[] | undefined | null, token?: code.CancellationToken): Promise<code.SelectionRange[] | undefined>;
210
+ asInlineValue(value: ls.InlineValue): code.InlineValue;
211
+ asInlineValues(values: undefined | null, token?: code.CancellationToken): Promise<undefined>;
212
+ asInlineValues(values: ls.InlineValue[], token?: code.CancellationToken): Promise<code.InlineValue[]>;
213
+ asInlineValues(values: ls.InlineValue[] | undefined | null, token?: code.CancellationToken): Promise<code.InlineValue[] | undefined>;
214
+ asInlayHint(value: ls.InlayHint, token?: code.CancellationToken): Promise<code.InlayHint>;
215
+ asInlayHints(values: undefined | null, token?: code.CancellationToken): Promise<undefined>;
216
+ asInlayHints(values: ls.InlayHint[], token?: code.CancellationToken): Promise<code.InlayHint[]>;
217
+ asInlayHints(values: ls.InlayHint[] | undefined | null, token?: code.CancellationToken): Promise<code.InlayHint[] | undefined>;
218
+ asSemanticTokensLegend(value: ls.SemanticTokensLegend): code.SemanticTokensLegend;
219
+ asSemanticTokens(value: undefined | null, token?: code.CancellationToken): Promise<undefined>;
220
+ asSemanticTokens(value: ls.SemanticTokens, token?: code.CancellationToken): Promise<code.SemanticTokens>;
221
+ asSemanticTokens(value: ls.SemanticTokens | undefined | null, token?: code.CancellationToken): Promise<code.SemanticTokens | undefined>;
222
+ asSemanticTokensEdit(value: ls.SemanticTokensEdit): code.SemanticTokensEdit;
223
+ asSemanticTokensEdits(value: undefined | null, token?: code.CancellationToken): Promise<undefined>;
224
+ asSemanticTokensEdits(value: ls.SemanticTokensDelta, token?: code.CancellationToken): Promise<code.SemanticTokensEdits>;
225
+ asSemanticTokensEdits(value: ls.SemanticTokensDelta | undefined | null, token?: code.CancellationToken): Promise<code.SemanticTokensEdits | undefined>;
226
+ asCallHierarchyItem(item: null): undefined;
227
+ asCallHierarchyItem(item: ls.CallHierarchyItem): code.CallHierarchyItem;
228
+ asCallHierarchyItem(item: ls.CallHierarchyItem | null): code.CallHierarchyItem | undefined;
229
+ asCallHierarchyItems(items: null, token?: code.CancellationToken): Promise<undefined>;
230
+ asCallHierarchyItems(items: ls.CallHierarchyItem[], token?: code.CancellationToken): Promise<code.CallHierarchyItem[]>;
231
+ asCallHierarchyItems(items: ls.CallHierarchyItem[] | null, token?: code.CancellationToken): Promise<code.CallHierarchyItem[] | undefined>;
232
+ asCallHierarchyIncomingCall(item: ls.CallHierarchyIncomingCall, token?: code.CancellationToken): Promise<code.CallHierarchyIncomingCall>;
233
+ asCallHierarchyIncomingCalls(items: null, token?: code.CancellationToken): Promise<undefined>;
234
+ asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall>, token?: code.CancellationToken): Promise<code.CallHierarchyIncomingCall[]>;
235
+ asCallHierarchyIncomingCalls(items: ReadonlyArray<ls.CallHierarchyIncomingCall> | null, token?: code.CancellationToken): Promise<code.CallHierarchyIncomingCall[] | undefined>;
236
+ asCallHierarchyOutgoingCall(item: ls.CallHierarchyOutgoingCall, token?: code.CancellationToken): Promise<code.CallHierarchyOutgoingCall>;
237
+ asCallHierarchyOutgoingCalls(items: null, token?: code.CancellationToken): Promise<undefined>;
238
+ asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall>, token?: code.CancellationToken): Promise<code.CallHierarchyOutgoingCall[]>;
239
+ asCallHierarchyOutgoingCalls(items: ReadonlyArray<ls.CallHierarchyOutgoingCall> | null, token?: code.CancellationToken): Promise<code.CallHierarchyOutgoingCall[] | undefined>;
240
+ asLinkedEditingRanges(value: null | undefined, token?: code.CancellationToken): Promise<undefined>;
241
+ asLinkedEditingRanges(value: ls.LinkedEditingRanges, token?: code.CancellationToken): Promise<code.LinkedEditingRanges>;
242
+ asLinkedEditingRanges(value: ls.LinkedEditingRanges | null | undefined, token?: code.CancellationToken): Promise<code.LinkedEditingRanges | undefined>;
243
+ asTypeHierarchyItem(item: null): undefined;
244
+ asTypeHierarchyItem(item: ls.TypeHierarchyItem): code.TypeHierarchyItem;
245
+ asTypeHierarchyItem(item: ls.TypeHierarchyItem | null): code.TypeHierarchyItem | undefined;
246
+ asTypeHierarchyItems(items: null, token?: code.CancellationToken): Promise<undefined>;
247
+ asTypeHierarchyItems(items: ls.TypeHierarchyItem[], token?: code.CancellationToken): Promise<code.TypeHierarchyItem[]>;
248
+ asTypeHierarchyItems(items: ls.TypeHierarchyItem[] | null, token?: code.CancellationToken): Promise<code.TypeHierarchyItem[] | undefined>;
249
+ asGlobPattern(pattern: ls.GlobPattern): code.GlobPattern | undefined;
250
+ }
251
+ interface URIConverter {
252
+ (value: string): code.Uri;
253
+ }
254
+
255
+ interface DocumentSemanticsTokensSignature {
256
+ (this: void, document: code.TextDocument, token: code.CancellationToken): code.ProviderResult<code.SemanticTokens>;
257
+ }
258
+ interface DocumentSemanticsTokensEditsSignature {
259
+ (this: void, document: code.TextDocument, previousResultId: string, token: code.CancellationToken): code.ProviderResult<code.SemanticTokensEdits | code.SemanticTokens>;
260
+ }
261
+ interface DocumentRangeSemanticTokensSignature {
262
+ (this: void, document: code.TextDocument, range: code.Range, token: code.CancellationToken): code.ProviderResult<code.SemanticTokens>;
263
+ }
264
+ /**
265
+ * The semantic token middleware
266
+ *
267
+ * @since 3.16.0
268
+ */
269
+ interface SemanticTokensMiddleware {
270
+ provideDocumentSemanticTokens?: (this: void, document: code.TextDocument, token: code.CancellationToken, next: DocumentSemanticsTokensSignature) => code.ProviderResult<code.SemanticTokens>;
271
+ provideDocumentSemanticTokensEdits?: (this: void, document: code.TextDocument, previousResultId: string, token: code.CancellationToken, next: DocumentSemanticsTokensEditsSignature) => code.ProviderResult<code.SemanticTokensEdits | code.SemanticTokens>;
272
+ provideDocumentRangeSemanticTokens?: (this: void, document: code.TextDocument, range: code.Range, token: code.CancellationToken, next: DocumentRangeSemanticTokensSignature) => code.ProviderResult<code.SemanticTokens>;
273
+ }
274
+ interface SemanticTokensProviderShape {
275
+ range?: code.DocumentRangeSemanticTokensProvider;
276
+ full?: code.DocumentSemanticTokensProvider;
277
+ onDidChangeSemanticTokensEmitter: code.EventEmitter<void>;
278
+ }
279
+
280
+ interface TextDocumentSynchronizationMiddleware {
281
+ didOpen?: NextSignature<TextDocument, Promise<void>>;
282
+ didChange?: NextSignature<TextDocumentChangeEvent, Promise<void>>;
283
+ willSave?: NextSignature<TextDocumentWillSaveEvent, Promise<void>>;
284
+ willSaveWaitUntil?: NextSignature<TextDocumentWillSaveEvent, Thenable<TextEdit[]>>;
285
+ didSave?: NextSignature<TextDocument, Promise<void>>;
286
+ didClose?: NextSignature<TextDocument, Promise<void>>;
287
+ }
288
+ interface DidOpenTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>, NotifyingFeature<TextDocument, DidOpenTextDocumentParams> {
289
+ openDocuments: Iterable<TextDocument>;
290
+ }
291
+ interface DidCloseTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>, NotifyingFeature<TextDocument, DidCloseTextDocumentParams> {
292
+ }
293
+ interface DidChangeTextDocumentFeatureShape extends DynamicFeature<TextDocumentChangeRegistrationOptions>, TextDocumentSendFeature<(event: TextDocumentChangeEvent) => Promise<void>>, NotifyingFeature<TextDocumentChangeEvent, DidChangeTextDocumentParams> {
294
+ }
295
+ interface DidSaveTextDocumentFeatureShape extends DynamicFeature<TextDocumentRegistrationOptions>, TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>, NotifyingFeature<TextDocument, DidSaveTextDocumentParams> {
296
+ }
297
+
298
+ interface ProvideCodeLensesSignature {
299
+ (this: void, document: TextDocument, token: CancellationToken): ProviderResult<CodeLens[]>;
300
+ }
301
+ interface ResolveCodeLensSignature {
302
+ (this: void, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
303
+ }
304
+ interface CodeLensMiddleware {
305
+ provideCodeLenses?: (this: void, document: TextDocument, token: CancellationToken, next: ProvideCodeLensesSignature) => ProviderResult<CodeLens[]>;
306
+ resolveCodeLens?: (this: void, codeLens: CodeLens, token: CancellationToken, next: ResolveCodeLensSignature) => ProviderResult<CodeLens>;
307
+ }
308
+ declare type CodeLensProviderShape = {
309
+ provider?: CodeLensProvider;
310
+ onDidChangeCodeLensEmitter: EventEmitter<void>;
311
+ };
312
+
313
+ declare type ProvideInlineValuesSignature = (this: void, document: TextDocument, viewPort: Range, context: InlineValueContext, token: CancellationToken) => ProviderResult<InlineValue[]>;
314
+ declare type InlineValueMiddleware = {
315
+ provideInlineValues?: (this: void, document: TextDocument, viewPort: Range, context: InlineValueContext, token: CancellationToken, next: ProvideInlineValuesSignature) => ProviderResult<InlineValue[]>;
316
+ };
317
+ declare type InlineValueProviderShape = {
318
+ provider: InlineValuesProvider;
319
+ onDidChangeInlineValues: EventEmitter<void>;
320
+ };
321
+
322
+ declare type ProvideInlayHintsSignature = (this: void, document: TextDocument, viewPort: Range, token: CancellationToken) => ProviderResult<InlayHint[]>;
323
+ declare type ResolveInlayHintSignature = (this: void, item: InlayHint, token: CancellationToken) => ProviderResult<InlayHint>;
324
+ declare type InlayHintsMiddleware = {
325
+ provideInlayHints?: (this: void, document: TextDocument, viewPort: Range, token: CancellationToken, next: ProvideInlayHintsSignature) => ProviderResult<InlayHint[]>;
326
+ resolveInlayHint?: (this: void, item: InlayHint, token: CancellationToken, next: ResolveInlayHintSignature) => ProviderResult<InlayHint>;
327
+ };
328
+ declare type InlayHintsProviderShape = {
329
+ provider: InlayHintsProvider;
330
+ onDidChangeInlayHints: EventEmitter<void>;
331
+ };
332
+
333
+ declare namespace vsdiag {
334
+ enum DocumentDiagnosticReportKind {
335
+ full = "full",
336
+ unChanged = "unChanged"
337
+ }
338
+ interface FullDocumentDiagnosticReport {
339
+ kind: DocumentDiagnosticReportKind.full;
340
+ resultId?: string;
341
+ items: Diagnostic[];
342
+ }
343
+ interface RelatedFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
344
+ relatedDocuments?: {
345
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
346
+ };
347
+ }
348
+ interface UnchangedDocumentDiagnosticReport {
349
+ kind: DocumentDiagnosticReportKind.unChanged;
350
+ resultId: string;
351
+ }
352
+ interface RelatedUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
353
+ relatedDocuments?: {
354
+ [uri: string /** DocumentUri */]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
355
+ };
356
+ }
357
+ type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport;
358
+ type PreviousResultId = {
359
+ uri: Uri;
360
+ value: string;
361
+ };
362
+ interface WorkspaceFullDocumentDiagnosticReport extends FullDocumentDiagnosticReport {
363
+ uri: Uri;
364
+ version: number | null;
365
+ }
366
+ interface WorkspaceUnchangedDocumentDiagnosticReport extends UnchangedDocumentDiagnosticReport {
367
+ uri: Uri;
368
+ version: number | null;
369
+ }
370
+ type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport;
371
+ interface WorkspaceDiagnosticReport {
372
+ items: WorkspaceDocumentDiagnosticReport[];
373
+ }
374
+ interface WorkspaceDiagnosticReportPartialResult {
375
+ items: WorkspaceDocumentDiagnosticReport[];
376
+ }
377
+ interface ResultReporter {
378
+ (chunk: WorkspaceDiagnosticReportPartialResult | null): void;
379
+ }
380
+ interface DiagnosticProvider {
381
+ onDidChangeDiagnostics: Event<void>;
382
+ provideDiagnostics(document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken$1): ProviderResult<DocumentDiagnosticReport>;
383
+ provideWorkspaceDiagnostics?(resultIds: PreviousResultId[], token: CancellationToken$1, resultReporter: ResultReporter): ProviderResult<WorkspaceDiagnosticReport>;
384
+ }
385
+ }
386
+ declare type ProvideDiagnosticSignature = (this: void, document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken$1) => ProviderResult<vsdiag.DocumentDiagnosticReport>;
387
+ declare type ProvideWorkspaceDiagnosticSignature = (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken$1, resultReporter: vsdiag.ResultReporter) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>;
388
+ declare type DiagnosticProviderMiddleware = {
389
+ provideDiagnostics?: (this: void, document: TextDocument | Uri, previousResultId: string | undefined, token: CancellationToken$1, next: ProvideDiagnosticSignature) => ProviderResult<vsdiag.DocumentDiagnosticReport>;
390
+ provideWorkspaceDiagnostics?: (this: void, resultIds: vsdiag.PreviousResultId[], token: CancellationToken$1, resultReporter: vsdiag.ResultReporter, next: ProvideWorkspaceDiagnosticSignature) => ProviderResult<vsdiag.WorkspaceDiagnosticReport>;
391
+ };
392
+ declare enum DiagnosticPullMode {
393
+ onType = "onType",
394
+ onSave = "onSave"
395
+ }
396
+ declare type DiagnosticPullOptions = {
397
+ /**
398
+ * Whether to pull for diagnostics on document change.
399
+ */
400
+ onChange?: boolean;
401
+ /**
402
+ * Whether to pull for diagnostics on document save.
403
+ */
404
+ onSave?: boolean;
405
+ /**
406
+ * An optional filter method that is consulted when triggering a
407
+ * diagnostic pull during document change or document save.
408
+ *
409
+ * @param document the document that changes or got save
410
+ * @param mode the mode
411
+ */
412
+ filter?(document: TextDocument, mode: DiagnosticPullMode): boolean;
413
+ /**
414
+ * Whether to pull for diagnostics on resources of non instantiated
415
+ * tabs. If it is set to true it is highly recommended to provide
416
+ * a match method as well. Otherwise the client will not pull for
417
+ * tabs if the used document selector specifies a language property
418
+ * since the language value is not known for resources.
419
+ */
420
+ onTabs?: boolean;
421
+ /**
422
+ * A optional match method that is consulted when pulling for diagnostics
423
+ * when only a URI is known (e.g. for not instantiated tabs)
424
+ *
425
+ * @param documentSelector the document selector
426
+ * @param resource the resource.
427
+ */
428
+ match?(documentSelector: DocumentSelector, resource: Uri): boolean;
429
+ };
430
+ declare type $DiagnosticPullOptions = {
431
+ diagnosticPullOptions?: DiagnosticPullOptions;
432
+ };
433
+ declare type DiagnosticProviderShape = {
434
+ onDidChangeDiagnosticsEmitter: EventEmitter<void>;
435
+ diagnostics: vsdiag.DiagnosticProvider;
436
+ };
437
+
438
+ declare type VNotebookDocumentChangeEvent = {
439
+ /**
440
+ * The notebook document
441
+ */
442
+ notebook: code.NotebookDocument;
443
+ /**
444
+ * The changed meta data if any.
445
+ */
446
+ metadata?: {
447
+ [key: string]: any;
448
+ };
449
+ /**
450
+ * Changes to cells.
451
+ */
452
+ cells?: {
453
+ /**
454
+ * Changes to the cell structure to add or
455
+ * remove cells.
456
+ */
457
+ structure?: {
458
+ /**
459
+ * The change to the cell array.
460
+ */
461
+ array: {
462
+ start: number;
463
+ deleteCount: number;
464
+ cells?: code.NotebookCell[];
465
+ };
466
+ /**
467
+ * Additional opened cell text documents.
468
+ */
469
+ didOpen?: code.NotebookCell[];
470
+ /**
471
+ * Additional closed cell text documents.
472
+ */
473
+ didClose?: code.NotebookCell[];
474
+ };
475
+ /**
476
+ * Changes to notebook cells properties like its
477
+ * kind or metadata.
478
+ */
479
+ data?: code.NotebookCell[];
480
+ /**
481
+ * Changes to the text content of notebook cells.
482
+ */
483
+ textContent?: code.TextDocumentChangeEvent[];
484
+ };
485
+ };
486
+ declare type NotebookDocumentOptions = {
487
+ filterCells?(notebookDocument: code.NotebookDocument, cells: code.NotebookCell[]): code.NotebookCell[];
488
+ };
489
+ declare type $NotebookDocumentOptions = {
490
+ notebookDocumentOptions?: NotebookDocumentOptions;
491
+ };
492
+ declare type NotebookDocumentMiddleware = {
493
+ notebooks?: {
494
+ didOpen?: (this: void, notebookDocument: code.NotebookDocument, cells: code.NotebookCell[], next: (this: void, notebookDocument: code.NotebookDocument, cells: code.NotebookCell[]) => Promise<void>) => Promise<void>;
495
+ didSave?: (this: void, notebookDocument: code.NotebookDocument, next: (this: void, notebookDocument: code.NotebookDocument) => Promise<void>) => Promise<void>;
496
+ didChange?: (this: void, event: VNotebookDocumentChangeEvent, next: (this: void, event: VNotebookDocumentChangeEvent) => Promise<void>) => Promise<void>;
497
+ didClose?: (this: void, notebookDocument: code.NotebookDocument, cells: code.NotebookCell[], next: (this: void, notebookDocument: code.NotebookDocument, cells: code.NotebookCell[]) => Promise<void>) => Promise<void>;
498
+ };
499
+ };
500
+ interface NotebookDocumentSyncFeatureShape {
501
+ sendDidOpenNotebookDocument(notebookDocument: code.NotebookDocument): Promise<void>;
502
+ sendDidSaveNotebookDocument(notebookDocument: code.NotebookDocument): Promise<void>;
503
+ sendDidChangeNotebookDocument(event: VNotebookDocumentChangeEvent): Promise<void>;
504
+ sendDidCloseNotebookDocument(notebookDocument: code.NotebookDocument): Promise<void>;
505
+ }
506
+ declare type NotebookDocumentProviderShape = {
507
+ getProvider(notebookCell: code.NotebookCell): NotebookDocumentSyncFeatureShape | undefined;
508
+ };
509
+
510
+ interface NextSignature<P, R> {
511
+ (this: void, data: P, next: (data: P) => R): R;
512
+ }
513
+ interface RegistrationData<T> {
514
+ id: string;
515
+ registerOptions: T;
516
+ }
517
+ declare type FeatureState = {
518
+ kind: 'document';
519
+ /**
520
+ * The features's id. This is usually the method names used during
521
+ * registration.
522
+ */
523
+ id: string;
524
+ /**
525
+ * Has active registrations.
526
+ */
527
+ registrations: boolean;
528
+ /**
529
+ * A registration matches an open document.
530
+ */
531
+ matches: boolean;
532
+ } | {
533
+ kind: 'workspace';
534
+ /**
535
+ * The features's id. This is usually the method names used during
536
+ * registration.
537
+ */
538
+ id: string;
539
+ /**
540
+ * Has active registrations.
541
+ */
542
+ registrations: boolean;
543
+ } | {
544
+ kind: 'window';
545
+ /**
546
+ * The features's id. This is usually the method names used during
547
+ * registration.
548
+ */
549
+ id: string;
550
+ /**
551
+ * Has active registrations.
552
+ */
553
+ registrations: boolean;
554
+ } | {
555
+ kind: 'static';
556
+ };
557
+ /**
558
+ * A static feature. A static feature can't be dynamically activated via the
559
+ * server. It is wired during the initialize sequence.
560
+ */
561
+ interface StaticFeature {
562
+ /**
563
+ * Called to fill the initialize params.
564
+ *
565
+ * @params the initialize params.
566
+ */
567
+ fillInitializeParams?: (params: InitializeParams) => void;
568
+ /**
569
+ * Called to fill in the client capabilities this feature implements.
570
+ *
571
+ * @param capabilities The client capabilities to fill.
572
+ */
573
+ fillClientCapabilities(capabilities: ClientCapabilities): void;
574
+ /**
575
+ * A preflight where the server capabilities are shown to all features
576
+ * before a feature is actually initialized. This allows feature to
577
+ * capture some state if they are a pre-requisite for other features.
578
+ *
579
+ * @param capabilities the server capabilities
580
+ * @param documentSelector the document selector pass to the client's constructor.
581
+ * May be `undefined` if the client was created without a selector.
582
+ */
583
+ preInitialize?: (capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined) => void;
584
+ /**
585
+ * Initialize the feature. This method is called on a feature instance
586
+ * when the client has successfully received the initialize request from
587
+ * the server and before the client sends the initialized notification
588
+ * to the server.
589
+ *
590
+ * @param capabilities the server capabilities
591
+ * @param documentSelector the document selector pass to the client's constructor.
592
+ * May be `undefined` if the client was created without a selector.
593
+ */
594
+ initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined): void;
595
+ /**
596
+ * Returns the state the feature is in.
597
+ */
598
+ getState(): FeatureState;
599
+ /**
600
+ * Called when the client is stopped to dispose this feature. Usually a feature
601
+ * un-registers listeners registered hooked up with the VS Code extension host.
602
+ */
603
+ dispose(): void;
604
+ }
605
+ declare namespace StaticFeature {
606
+ function is(value: any): value is StaticFeature;
607
+ }
608
+ /**
609
+ * A dynamic feature can be activated via the server.
610
+ */
611
+ interface DynamicFeature<RO> {
612
+ /**
613
+ * Called to fill the initialize params.
614
+ *
615
+ * @params the initialize params.
616
+ */
617
+ fillInitializeParams?: (params: InitializeParams) => void;
618
+ /**
619
+ * Called to fill in the client capabilities this feature implements.
620
+ *
621
+ * @param capabilities The client capabilities to fill.
622
+ */
623
+ fillClientCapabilities(capabilities: ClientCapabilities): void;
624
+ /**
625
+ * A preflight where the server capabilities are shown to all features
626
+ * before a feature is actually initialized. This allows feature to
627
+ * capture some state if they are a pre-requisite for other features.
628
+ *
629
+ * @param capabilities the server capabilities
630
+ * @param documentSelector the document selector pass to the client's constructor.
631
+ * May be `undefined` if the client was created without a selector.
632
+ */
633
+ preInitialize?: (capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined) => void;
634
+ /**
635
+ * Initialize the feature. This method is called on a feature instance
636
+ * when the client has successfully received the initialize request from
637
+ * the server and before the client sends the initialized notification
638
+ * to the server.
639
+ *
640
+ * @param capabilities the server capabilities.
641
+ * @param documentSelector the document selector pass to the client's constructor.
642
+ * May be `undefined` if the client was created without a selector.
643
+ */
644
+ initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined): void;
645
+ /**
646
+ * Returns the state the feature is in.
647
+ */
648
+ getState(): FeatureState;
649
+ /**
650
+ * The signature (e.g. method) for which this features support dynamic activation / registration.
651
+ */
652
+ registrationType: RegistrationType<RO>;
653
+ /**
654
+ * Is called when the server send a register request for the given message.
655
+ *
656
+ * @param data additional registration data as defined in the protocol.
657
+ */
658
+ register(data: RegistrationData<RO>): void;
659
+ /**
660
+ * Is called when the server wants to unregister a feature.
661
+ *
662
+ * @param id the id used when registering the feature.
663
+ */
664
+ unregister(id: string): void;
665
+ /**
666
+ * Called when the client is stopped to dispose this feature. Usually a feature
667
+ * un-registers listeners registered hooked up with the VS Code extension host.
668
+ */
669
+ dispose(): void;
670
+ }
671
+ declare namespace DynamicFeature {
672
+ function is<T>(value: any): value is DynamicFeature<T>;
673
+ }
674
+ interface NotificationSendEvent<E, P> {
675
+ original: E;
676
+ type: ProtocolNotificationType<P, TextDocumentRegistrationOptions>;
677
+ params: P;
678
+ }
679
+ interface NotifyingFeature<E, P> {
680
+ onNotificationSent: Event<NotificationSendEvent<E, P>>;
681
+ }
682
+ /**
683
+ * A mixin type that allows to send notification or requests using a registered
684
+ * provider.
685
+ */
686
+ interface TextDocumentSendFeature<T extends Function> {
687
+ /**
688
+ * Returns a provider for the given text document.
689
+ */
690
+ getProvider(document: TextDocument): {
691
+ send: T;
692
+ } | undefined;
693
+ }
694
+ /**
695
+ * A mixin type to access a provider that is registered for a
696
+ * given text document / document selector.
697
+ */
698
+ interface TextDocumentProviderFeature<T> {
699
+ /**
700
+ * Triggers the corresponding RPC method.
701
+ */
702
+ getProvider(textDocument: TextDocument): T | undefined;
703
+ }
704
+ interface WorkspaceProviderFeature<PR> {
705
+ getProviders(): PR[] | undefined;
706
+ }
707
+ interface FeatureClient<M, CO = object> {
708
+ protocol2CodeConverter: Converter;
709
+ code2ProtocolConverter: Converter$1;
710
+ clientOptions: CO;
711
+ middleware: M;
712
+ start(): Promise<void>;
713
+ isRunning(): boolean;
714
+ stop(): Promise<void>;
715
+ sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken$1): Promise<R>;
716
+ sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken$1): Promise<R>;
717
+ sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken$1): Promise<R>;
718
+ sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken$1): Promise<R>;
719
+ sendRequest<R>(method: string, token?: CancellationToken$1): Promise<R>;
720
+ sendRequest<R>(method: string, param: any, token?: CancellationToken$1): Promise<R>;
721
+ onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable$1;
722
+ onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable$1;
723
+ onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable$1;
724
+ onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable$1;
725
+ onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable$1;
726
+ sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
727
+ sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
728
+ sendNotification(type: NotificationType0): Promise<void>;
729
+ sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
730
+ sendNotification(method: string): Promise<void>;
731
+ sendNotification(method: string, params: any): Promise<void>;
732
+ onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable$1;
733
+ onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable$1;
734
+ onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable$1;
735
+ onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable$1;
736
+ onNotification(method: string, handler: GenericNotificationHandler): Disposable$1;
737
+ onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable$1;
738
+ info(message: string, data?: any, showNotification?: boolean): void;
739
+ warn(message: string, data?: any, showNotification?: boolean): void;
740
+ error(message: string, data?: any, showNotification?: boolean | 'force'): void;
741
+ handleFailedRequest<T>(type: MessageSignature, token: CancellationToken$1 | undefined, error: any, defaultValue: T, showNotification?: boolean): T;
742
+ hasDedicatedTextSynchronizationFeature(textDocument: TextDocument): boolean;
743
+ getFeature(request: typeof DidOpenTextDocumentNotification.method): DidOpenTextDocumentFeatureShape;
744
+ getFeature(request: typeof DidChangeTextDocumentNotification.method): DidChangeTextDocumentFeatureShape;
745
+ getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>;
746
+ getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => ProviderResult<TextEdit[]>>;
747
+ getFeature(request: typeof DidSaveTextDocumentNotification.method): DidSaveTextDocumentFeatureShape;
748
+ getFeature(request: typeof DidCloseTextDocumentNotification.method): DidCloseTextDocumentFeatureShape;
749
+ getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
750
+ send: (event: FileCreateEvent) => Promise<void>;
751
+ };
752
+ getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
753
+ send: (event: FileRenameEvent) => Promise<void>;
754
+ };
755
+ getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
756
+ send: (event: FileDeleteEvent) => Promise<void>;
757
+ };
758
+ getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
759
+ send: (event: FileWillCreateEvent) => Promise<void>;
760
+ };
761
+ getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
762
+ send: (event: FileWillRenameEvent) => Promise<void>;
763
+ };
764
+ getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
765
+ send: (event: FileWillDeleteEvent) => Promise<void>;
766
+ };
767
+ getFeature(request: typeof CompletionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CompletionItemProvider>;
768
+ getFeature(request: typeof HoverRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<HoverProvider>;
769
+ getFeature(request: typeof SignatureHelpRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SignatureHelpProvider>;
770
+ getFeature(request: typeof DefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DefinitionProvider>;
771
+ getFeature(request: typeof ReferencesRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ReferenceProvider>;
772
+ getFeature(request: typeof DocumentHighlightRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentHighlightProvider>;
773
+ getFeature(request: typeof CodeActionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeActionProvider>;
774
+ getFeature(request: typeof CodeLensRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeLensProviderShape>;
775
+ getFeature(request: typeof DocumentFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentFormattingEditProvider>;
776
+ getFeature(request: typeof DocumentRangeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentRangeFormattingEditProvider>;
777
+ getFeature(request: typeof DocumentOnTypeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<OnTypeFormattingEditProvider>;
778
+ getFeature(request: typeof RenameRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<RenameProvider>;
779
+ getFeature(request: typeof DocumentSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentSymbolProvider>;
780
+ getFeature(request: typeof DocumentLinkRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentLinkProvider>;
781
+ getFeature(request: typeof DocumentColorRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentColorProvider>;
782
+ getFeature(request: typeof DeclarationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DeclarationProvider>;
783
+ getFeature(request: typeof FoldingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<FoldingRangeProvider>;
784
+ getFeature(request: typeof ImplementationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ImplementationProvider>;
785
+ getFeature(request: typeof SelectionRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SelectionRangeProvider>;
786
+ getFeature(request: typeof TypeDefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeDefinitionProvider>;
787
+ getFeature(request: typeof CallHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CallHierarchyProvider>;
788
+ getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviderShape>;
789
+ getFeature(request: typeof LinkedEditingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<LinkedEditingRangeProvider>;
790
+ getFeature(request: typeof TypeHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeHierarchyProvider>;
791
+ getFeature(request: typeof InlineValueRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlineValueProviderShape>;
792
+ getFeature(request: typeof InlayHintRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlayHintsProviderShape>;
793
+ getFeature(request: typeof WorkspaceSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & WorkspaceProviderFeature<WorkspaceSymbolProvider>;
794
+ getFeature(request: typeof DocumentDiagnosticRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DiagnosticProviderShape> | undefined;
795
+ getFeature(request: typeof NotebookDocumentSyncRegistrationType.method): DynamicFeature<NotebookDocumentSyncRegistrationOptions> & NotebookDocumentProviderShape | undefined;
796
+ }
797
+
798
+ interface ConfigurationMiddleware {
799
+ configuration?: ConfigurationRequest.MiddlewareSignature;
800
+ }
801
+ interface DidChangeConfigurationSignature {
802
+ (this: void, sections: string[] | undefined): Promise<void>;
803
+ }
804
+ interface DidChangeConfigurationMiddleware {
805
+ didChangeConfiguration?: (this: void, sections: string[] | undefined, next: DidChangeConfigurationSignature) => Promise<void>;
806
+ }
807
+ declare type SynchronizeOptions = {
808
+ /**
809
+ * The configuration sections to synchronize. Pushing settings from the
810
+ * client to the server is deprecated in favour of the new pull model
811
+ * that allows servers to query settings scoped on resources. In this
812
+ * model the client can only deliver an empty change event since the
813
+ * actually setting value can vary on the provided resource scope.
814
+ *
815
+ * @deprecated Use the new pull model (`workspace/configuration` request)
816
+ */
817
+ configurationSection?: string | string[];
818
+ /**
819
+ * Asks the client to send file change events to the server. Watchers
820
+ * operate on workspace folders. The LSP client doesn't support watching
821
+ * files outside a workspace folder.
822
+ */
823
+ fileEvents?: FileSystemWatcher | FileSystemWatcher[];
824
+ };
825
+ declare type $ConfigurationOptions = {
826
+ synchronize?: SynchronizeOptions;
827
+ workspaceFolder?: WorkspaceFolder;
828
+ };
829
+
830
+ interface ProvideCompletionItemsSignature {
831
+ (this: void, document: TextDocument, position: Position, context: CompletionContext, token: CancellationToken$1): ProviderResult<CompletionItem[] | CompletionList>;
832
+ }
833
+ interface ResolveCompletionItemSignature {
834
+ (this: void, item: CompletionItem, token: CancellationToken$1): ProviderResult<CompletionItem>;
835
+ }
836
+ interface CompletionMiddleware {
837
+ provideCompletionItem?: (this: void, document: TextDocument, position: Position, context: CompletionContext, token: CancellationToken$1, next: ProvideCompletionItemsSignature) => ProviderResult<CompletionItem[] | CompletionList>;
838
+ resolveCompletionItem?: (this: void, item: CompletionItem, token: CancellationToken$1, next: ResolveCompletionItemSignature) => ProviderResult<CompletionItem>;
839
+ }
840
+
841
+ interface ProvideHoverSignature {
842
+ (this: void, document: TextDocument, position: Position, token: CancellationToken$1): ProviderResult<Hover>;
843
+ }
844
+ interface HoverMiddleware {
845
+ provideHover?: (this: void, document: TextDocument, position: Position, token: CancellationToken$1, next: ProvideHoverSignature) => ProviderResult<Hover>;
846
+ }
847
+
848
+ interface ProvideDefinitionSignature {
849
+ (this: void, document: TextDocument, position: Position, token: CancellationToken$1): ProviderResult<Definition | DefinitionLink[]>;
850
+ }
851
+ interface DefinitionMiddleware {
852
+ provideDefinition?: (this: void, document: TextDocument, position: Position, token: CancellationToken$1, next: ProvideDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
853
+ }
854
+
855
+ interface ProvideSignatureHelpSignature {
856
+ (this: void, document: TextDocument, position: Position, context: SignatureHelpContext, token: CancellationToken$1): ProviderResult<SignatureHelp>;
857
+ }
858
+ interface SignatureHelpMiddleware {
859
+ provideSignatureHelp?: (this: void, document: TextDocument, position: Position, context: SignatureHelpContext, token: CancellationToken$1, next: ProvideSignatureHelpSignature) => ProviderResult<SignatureHelp>;
860
+ }
861
+
862
+ interface ProvideDocumentHighlightsSignature {
863
+ (this: void, document: TextDocument, position: Position, token: CancellationToken$1): ProviderResult<DocumentHighlight[]>;
864
+ }
865
+ interface DocumentHighlightMiddleware {
866
+ provideDocumentHighlights?: (this: void, document: TextDocument, position: Position, token: CancellationToken$1, next: ProvideDocumentHighlightsSignature) => ProviderResult<DocumentHighlight[]>;
867
+ }
868
+
869
+ interface ProvideDocumentSymbolsSignature {
870
+ (this: void, document: TextDocument, token: CancellationToken$1): ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
871
+ }
872
+ interface DocumentSymbolMiddleware {
873
+ provideDocumentSymbols?: (this: void, document: TextDocument, token: CancellationToken$1, next: ProvideDocumentSymbolsSignature) => ProviderResult<SymbolInformation[] | DocumentSymbol[]>;
874
+ }
875
+
876
+ interface ProvideWorkspaceSymbolsSignature {
877
+ (this: void, query: string, token: CancellationToken$1): ProviderResult<SymbolInformation[]>;
878
+ }
879
+ interface ResolveWorkspaceSymbolSignature {
880
+ (this: void, item: SymbolInformation, token: CancellationToken$1): ProviderResult<SymbolInformation>;
881
+ }
882
+ interface WorkspaceSymbolMiddleware {
883
+ provideWorkspaceSymbols?: (this: void, query: string, token: CancellationToken$1, next: ProvideWorkspaceSymbolsSignature) => ProviderResult<SymbolInformation[]>;
884
+ resolveWorkspaceSymbol?: (this: void, item: SymbolInformation, token: CancellationToken$1, next: ResolveWorkspaceSymbolSignature) => ProviderResult<SymbolInformation>;
885
+ }
886
+
887
+ interface ProvideReferencesSignature {
888
+ (this: void, document: TextDocument, position: Position, options: {
889
+ includeDeclaration: boolean;
890
+ }, token: CancellationToken$1): ProviderResult<Location[]>;
891
+ }
892
+ interface ReferencesMiddleware {
893
+ provideReferences?: (this: void, document: TextDocument, position: Position, options: {
894
+ includeDeclaration: boolean;
895
+ }, token: CancellationToken$1, next: ProvideReferencesSignature) => ProviderResult<Location[]>;
896
+ }
897
+
898
+ interface ProvideTypeDefinitionSignature {
899
+ (this: void, document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
900
+ }
901
+ interface TypeDefinitionMiddleware {
902
+ provideTypeDefinition?: (this: void, document: TextDocument, position: Position, token: CancellationToken, next: ProvideTypeDefinitionSignature) => ProviderResult<Definition | DefinitionLink[]>;
903
+ }
904
+
905
+ interface ProvideImplementationSignature {
906
+ (this: void, document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
907
+ }
908
+ interface ImplementationMiddleware {
909
+ provideImplementation?: (this: void, document: TextDocument, position: Position, token: CancellationToken, next: ProvideImplementationSignature) => ProviderResult<Definition | DefinitionLink[]>;
910
+ }
911
+
912
+ interface ProvideDocumentColorsSignature {
913
+ (document: TextDocument, token: CancellationToken): ProviderResult<ColorInformation[]>;
914
+ }
915
+ interface ProvideColorPresentationSignature {
916
+ (color: Color, context: {
917
+ document: TextDocument;
918
+ range: Range;
919
+ }, token: CancellationToken): ProviderResult<ColorPresentation[]>;
920
+ }
921
+ interface ColorProviderMiddleware {
922
+ provideDocumentColors?: (this: void, document: TextDocument, token: CancellationToken, next: ProvideDocumentColorsSignature) => ProviderResult<ColorInformation[]>;
923
+ provideColorPresentations?: (this: void, color: Color, context: {
924
+ document: TextDocument;
925
+ range: Range;
926
+ }, token: CancellationToken, next: ProvideColorPresentationSignature) => ProviderResult<ColorPresentation[]>;
927
+ }
928
+
929
+ interface ProvideCodeActionsSignature {
930
+ (this: void, document: TextDocument, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | CodeAction)[]>;
931
+ }
932
+ interface ResolveCodeActionSignature {
933
+ (this: void, item: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
934
+ }
935
+ interface CodeActionMiddleware {
936
+ provideCodeActions?: (this: void, document: TextDocument, range: Range, context: CodeActionContext, token: CancellationToken, next: ProvideCodeActionsSignature) => ProviderResult<(Command | CodeAction)[]>;
937
+ resolveCodeAction?: (this: void, item: CodeAction, token: CancellationToken, next: ResolveCodeActionSignature) => ProviderResult<CodeAction>;
938
+ }
939
+
940
+ interface ProvideDocumentFormattingEditsSignature {
941
+ (this: void, document: TextDocument, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
942
+ }
943
+ interface ProvideDocumentRangeFormattingEditsSignature {
944
+ (this: void, document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
945
+ }
946
+ interface ProvideOnTypeFormattingEditsSignature {
947
+ (this: void, document: TextDocument, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
948
+ }
949
+ interface FormattingMiddleware {
950
+ provideDocumentFormattingEdits?: (this: void, document: TextDocument, options: FormattingOptions, token: CancellationToken, next: ProvideDocumentFormattingEditsSignature) => ProviderResult<TextEdit[]>;
951
+ provideDocumentRangeFormattingEdits?: (this: void, document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken, next: ProvideDocumentRangeFormattingEditsSignature) => ProviderResult<TextEdit[]>;
952
+ provideOnTypeFormattingEdits?: (this: void, document: TextDocument, position: Position, ch: string, options: FormattingOptions, token: CancellationToken, next: ProvideOnTypeFormattingEditsSignature) => ProviderResult<TextEdit[]>;
953
+ }
954
+
955
+ interface ProvideRenameEditsSignature {
956
+ (this: void, document: TextDocument, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit>;
957
+ }
958
+ interface PrepareRenameSignature {
959
+ (this: void, document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Range | {
960
+ range: Range;
961
+ placeholder: string;
962
+ }>;
963
+ }
964
+ interface RenameMiddleware {
965
+ provideRenameEdits?: (this: void, document: TextDocument, position: Position, newName: string, token: CancellationToken, next: ProvideRenameEditsSignature) => ProviderResult<WorkspaceEdit>;
966
+ prepareRename?: (this: void, document: TextDocument, position: Position, token: CancellationToken, next: PrepareRenameSignature) => ProviderResult<Range | {
967
+ range: Range;
968
+ placeholder: string;
969
+ }>;
970
+ }
971
+
972
+ interface ProvideDocumentLinksSignature {
973
+ (this: void, document: TextDocument, token: CancellationToken$1): ProviderResult<DocumentLink[]>;
974
+ }
975
+ interface ResolveDocumentLinkSignature {
976
+ (this: void, link: DocumentLink, token: CancellationToken$1): ProviderResult<DocumentLink>;
977
+ }
978
+ interface DocumentLinkMiddleware {
979
+ provideDocumentLinks?: (this: void, document: TextDocument, token: CancellationToken$1, next: ProvideDocumentLinksSignature) => ProviderResult<DocumentLink[]>;
980
+ resolveDocumentLink?: (this: void, link: DocumentLink, token: CancellationToken$1, next: ResolveDocumentLinkSignature) => ProviderResult<DocumentLink>;
981
+ }
982
+
983
+ interface ExecuteCommandSignature {
984
+ (this: void, command: string, args: any[]): ProviderResult<any>;
985
+ }
986
+ interface ExecuteCommandMiddleware {
987
+ executeCommand?: (this: void, command: string, args: any[], next: ExecuteCommandSignature) => ProviderResult<any>;
988
+ }
989
+
990
+ interface ProvideFoldingRangeSignature {
991
+ (this: void, document: TextDocument, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
992
+ }
993
+ interface FoldingRangeProviderMiddleware {
994
+ provideFoldingRanges?: (this: void, document: TextDocument, context: FoldingContext, token: CancellationToken, next: ProvideFoldingRangeSignature) => ProviderResult<FoldingRange[]>;
995
+ }
996
+
997
+ interface ProvideDeclarationSignature {
998
+ (this: void, document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Declaration>;
999
+ }
1000
+ interface DeclarationMiddleware {
1001
+ provideDeclaration?: (this: void, document: TextDocument, position: Position, token: CancellationToken, next: ProvideDeclarationSignature) => ProviderResult<Declaration>;
1002
+ }
1003
+
1004
+ interface ProvideSelectionRangeSignature {
1005
+ (this: void, document: TextDocument, positions: readonly Position[], token: CancellationToken): ProviderResult<SelectionRange[]>;
1006
+ }
1007
+ interface SelectionRangeProviderMiddleware {
1008
+ provideSelectionRanges?: (this: void, document: TextDocument, positions: readonly Position[], token: CancellationToken, next: ProvideSelectionRangeSignature) => ProviderResult<SelectionRange[]>;
1009
+ }
1010
+
1011
+ interface PrepareCallHierarchySignature {
1012
+ (this: void, document: TextDocument, position: Position, token: CancellationToken$1): ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
1013
+ }
1014
+ interface CallHierarchyIncomingCallsSignature {
1015
+ (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyIncomingCall[]>;
1016
+ }
1017
+ interface CallHierarchyOutgoingCallsSignature {
1018
+ (this: void, item: CallHierarchyItem, token: CancellationToken$1): ProviderResult<CallHierarchyOutgoingCall[]>;
1019
+ }
1020
+ /**
1021
+ * Call hierarchy middleware
1022
+ *
1023
+ * @since 3.16.0
1024
+ */
1025
+ interface CallHierarchyMiddleware {
1026
+ prepareCallHierarchy?: (this: void, document: TextDocument, positions: Position, token: CancellationToken$1, next: PrepareCallHierarchySignature) => ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
1027
+ provideCallHierarchyIncomingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyIncomingCallsSignature) => ProviderResult<CallHierarchyIncomingCall[]>;
1028
+ provideCallHierarchyOutgoingCalls?: (this: void, item: CallHierarchyItem, token: CancellationToken$1, next: CallHierarchyOutgoingCallsSignature) => ProviderResult<CallHierarchyOutgoingCall[]>;
1029
+ }
1030
+
1031
+ interface ProvideLinkedEditingRangeSignature {
1032
+ (this: void, document: code.TextDocument, position: code.Position, token: code.CancellationToken): code.ProviderResult<code.LinkedEditingRanges>;
1033
+ }
1034
+ /**
1035
+ * Linked editing middleware
1036
+ *
1037
+ * @since 3.16.0
1038
+ */
1039
+ interface LinkedEditingRangeMiddleware {
1040
+ provideLinkedEditingRange?: (this: void, document: code.TextDocument, position: code.Position, token: code.CancellationToken, next: ProvideLinkedEditingRangeSignature) => code.ProviderResult<code.LinkedEditingRanges>;
1041
+ }
1042
+
1043
+ declare type PrepareTypeHierarchySignature = (this: void, document: TextDocument, position: Position, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
1044
+ declare type TypeHierarchySupertypesSignature = (this: void, item: TypeHierarchyItem, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
1045
+ declare type TypeHierarchySubtypesSignature = (this: void, item: TypeHierarchyItem, token: CancellationToken$1) => ProviderResult<TypeHierarchyItem[]>;
1046
+ /**
1047
+ * Type hierarchy middleware
1048
+ *
1049
+ * @since 3.17.0
1050
+ */
1051
+ declare type TypeHierarchyMiddleware = {
1052
+ prepareTypeHierarchy?: (this: void, document: TextDocument, positions: Position, token: CancellationToken$1, next: PrepareTypeHierarchySignature) => ProviderResult<TypeHierarchyItem[]>;
1053
+ provideTypeHierarchySupertypes?: (this: void, item: TypeHierarchyItem, token: CancellationToken$1, next: TypeHierarchySupertypesSignature) => ProviderResult<TypeHierarchyItem[]>;
1054
+ provideTypeHierarchySubtypes?: (this: void, item: TypeHierarchyItem, token: CancellationToken$1, next: TypeHierarchySubtypesSignature) => ProviderResult<TypeHierarchyItem[]>;
1055
+ };
1056
+
1057
+ declare type WorkspaceFolderMiddleware = {
1058
+ workspaceFolders?: WorkspaceFoldersRequest.MiddlewareSignature;
1059
+ didChangeWorkspaceFolders?: NextSignature<WorkspaceFoldersChangeEvent, Promise<void>>;
1060
+ };
1061
+
1062
+ /**
1063
+ * File operation middleware
1064
+ *
1065
+ * @since 3.16.0
1066
+ */
1067
+ interface FileOperationsMiddleware {
1068
+ didCreateFiles?: NextSignature<code.FileCreateEvent, Promise<void>>;
1069
+ willCreateFiles?: NextSignature<code.FileWillCreateEvent, Thenable<code.WorkspaceEdit | null | undefined>>;
1070
+ didRenameFiles?: NextSignature<code.FileRenameEvent, Promise<void>>;
1071
+ willRenameFiles?: NextSignature<code.FileWillRenameEvent, Thenable<code.WorkspaceEdit | null | undefined>>;
1072
+ didDeleteFiles?: NextSignature<code.FileDeleteEvent, Promise<void>>;
1073
+ willDeleteFiles?: NextSignature<code.FileWillDeleteEvent, Thenable<code.WorkspaceEdit | null | undefined>>;
1074
+ }
1075
+
1076
+ /**
1077
+ * Controls when the output channel is revealed.
1078
+ */
1079
+ declare enum RevealOutputChannelOn {
1080
+ Info = 1,
1081
+ Warn = 2,
1082
+ Error = 3,
1083
+ Never = 4
1084
+ }
1085
+ /**
1086
+ * A handler that is invoked when the initialization of the server failed.
1087
+ */
1088
+ declare type InitializationFailedHandler =
1089
+ /**
1090
+ * @param error The error returned from the server
1091
+ * @returns if true is returned the client tries to reinitialize the server.
1092
+ * Implementors of a handler are responsible to not initialize the server
1093
+ * infinitely. Return false if initialization should stop and an error
1094
+ * should be reported.
1095
+ */
1096
+ (error: ResponseError<InitializeError> | Error | any) => boolean;
1097
+ /**
1098
+ * An action to be performed when the connection is producing errors.
1099
+ */
1100
+ declare enum ErrorAction {
1101
+ /**
1102
+ * Continue running the server.
1103
+ */
1104
+ Continue = 1,
1105
+ /**
1106
+ * Shutdown the server.
1107
+ */
1108
+ Shutdown = 2
1109
+ }
1110
+ declare type ErrorHandlerResult = {
1111
+ /**
1112
+ * The action to take.
1113
+ */
1114
+ action: ErrorAction;
1115
+ /**
1116
+ * An optional message to be presented to the user.
1117
+ */
1118
+ message?: string;
1119
+ };
1120
+ /**
1121
+ * An action to be performed when the connection to a server got closed.
1122
+ */
1123
+ declare enum CloseAction {
1124
+ /**
1125
+ * Don't restart the server. The connection stays closed.
1126
+ */
1127
+ DoNotRestart = 1,
1128
+ /**
1129
+ * Restart the server.
1130
+ */
1131
+ Restart = 2
1132
+ }
1133
+ declare type CloseHandlerResult = {
1134
+ /**
1135
+ * The action to take.
1136
+ */
1137
+ action: CloseAction;
1138
+ /**
1139
+ * An optional message to be presented to the user.
1140
+ */
1141
+ message?: string;
1142
+ };
1143
+ /**
1144
+ * A plugable error handler that is invoked when the connection is either
1145
+ * producing errors or got closed.
1146
+ */
1147
+ interface ErrorHandler {
1148
+ /**
1149
+ * An error has occurred while writing or reading from the connection.
1150
+ *
1151
+ * @param error - the error received
1152
+ * @param message - the message to be delivered to the server if know.
1153
+ * @param count - a count indicating how often an error is received. Will
1154
+ * be reset if a message got successfully send or received.
1155
+ */
1156
+ error(error: Error, message: Message | undefined, count: number | undefined): ErrorHandlerResult;
1157
+ /**
1158
+ * The connection to the server got closed.
1159
+ */
1160
+ closed(): CloseHandlerResult;
1161
+ }
1162
+ /**
1163
+ * Signals in which state the language client is in.
1164
+ */
1165
+ declare enum State {
1166
+ /**
1167
+ * The client is stopped or got never started.
1168
+ */
1169
+ Stopped = 1,
1170
+ /**
1171
+ * The client is starting but not ready yet.
1172
+ */
1173
+ Starting = 3,
1174
+ /**
1175
+ * The client is running and ready.
1176
+ */
1177
+ Running = 2
1178
+ }
1179
+ /**
1180
+ * An event signaling a state change.
1181
+ */
1182
+ interface StateChangeEvent {
1183
+ oldState: State;
1184
+ newState: State;
1185
+ }
1186
+ interface DidChangeWatchedFileSignature {
1187
+ (this: void, event: FileEvent): Promise<void>;
1188
+ }
1189
+ declare type _WorkspaceMiddleware = {
1190
+ didChangeWatchedFile?: (this: void, event: FileEvent, next: DidChangeWatchedFileSignature) => Promise<void>;
1191
+ };
1192
+ declare type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationMiddleware & DidChangeConfigurationMiddleware & WorkspaceFolderMiddleware & FileOperationsMiddleware;
1193
+ interface _WindowMiddleware {
1194
+ showDocument?: (this: void, params: ShowDocumentParams, next: ShowDocumentRequest.HandlerSignature) => Promise<ShowDocumentResult>;
1195
+ }
1196
+ declare type WindowMiddleware = _WindowMiddleware;
1197
+ interface HandleDiagnosticsSignature {
1198
+ (this: void, uri: Uri, diagnostics: Diagnostic[]): void;
1199
+ }
1200
+ interface HandleWorkDoneProgressSignature {
1201
+ (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd): void;
1202
+ }
1203
+ interface _Middleware {
1204
+ handleDiagnostics?: (this: void, uri: Uri, diagnostics: Diagnostic[], next: HandleDiagnosticsSignature) => void;
1205
+ handleWorkDoneProgress?: (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd, next: HandleWorkDoneProgressSignature) => void;
1206
+ workspace?: WorkspaceMiddleware;
1207
+ window?: WindowMiddleware;
1208
+ }
1209
+ /**
1210
+ * The Middleware lets extensions intercept the request and notifications send and received
1211
+ * from the server
1212
+ */
1213
+ 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;
1214
+ declare type LanguageClientOptions$1 = {
1215
+ documentSelector?: DocumentSelector | string[];
1216
+ diagnosticCollectionName?: string;
1217
+ outputChannel?: OutputChannel;
1218
+ outputChannelName?: string;
1219
+ traceOutputChannel?: OutputChannel;
1220
+ revealOutputChannelOn?: RevealOutputChannelOn;
1221
+ /**
1222
+ * The encoding use to read stdout and stderr. Defaults
1223
+ * to 'utf8' if omitted.
1224
+ */
1225
+ stdioEncoding?: string;
1226
+ initializationOptions?: any | (() => any);
1227
+ initializationFailedHandler?: InitializationFailedHandler;
1228
+ progressOnInitialization?: boolean;
1229
+ errorHandler?: ErrorHandler;
1230
+ middleware?: Middleware;
1231
+ uriConverters?: {
1232
+ code2Protocol: URIConverter$1;
1233
+ protocol2Code: URIConverter;
1234
+ };
1235
+ workspaceFolder?: WorkspaceFolder;
1236
+ connectionOptions?: {
1237
+ cancellationStrategy: CancellationStrategy;
1238
+ maxRestartCount?: number;
1239
+ };
1240
+ markdown?: {
1241
+ isTrusted?: boolean;
1242
+ supportHtml?: boolean;
1243
+ };
1244
+ } & $NotebookDocumentOptions & $DiagnosticPullOptions & $ConfigurationOptions;
1245
+ interface MessageTransports {
1246
+ reader: MessageReader;
1247
+ writer: MessageWriter;
1248
+ detached?: boolean;
1249
+ }
1250
+ declare namespace MessageTransports {
1251
+ function is(value: any): value is MessageTransports;
1252
+ }
1253
+ declare abstract class BaseLanguageClient implements FeatureClient<Middleware, LanguageClientOptions$1> {
1254
+ private _id;
1255
+ private _name;
1256
+ private _clientOptions;
1257
+ private _state;
1258
+ private _onStart;
1259
+ private _onStop;
1260
+ private _connection;
1261
+ private _idleInterval;
1262
+ private readonly _ignoredRegistrations;
1263
+ private readonly _notificationHandlers;
1264
+ private readonly _notificationDisposables;
1265
+ private readonly _pendingNotificationHandlers;
1266
+ private readonly _requestHandlers;
1267
+ private readonly _requestDisposables;
1268
+ private readonly _pendingRequestHandlers;
1269
+ private readonly _progressHandlers;
1270
+ private readonly _pendingProgressHandlers;
1271
+ private readonly _progressDisposables;
1272
+ private _initializeResult;
1273
+ private _outputChannel;
1274
+ private _disposeOutputChannel;
1275
+ private _traceOutputChannel;
1276
+ private _capabilities;
1277
+ private _diagnostics;
1278
+ private _syncedDocuments;
1279
+ private _fileEvents;
1280
+ private _fileEventDelayer;
1281
+ private _telemetryEmitter;
1282
+ private _stateChangeEmitter;
1283
+ private _trace;
1284
+ private _traceFormat;
1285
+ private _tracer;
1286
+ private readonly _c2p;
1287
+ private readonly _p2c;
1288
+ constructor(id: string, name: string, clientOptions: LanguageClientOptions$1);
1289
+ get name(): string;
1290
+ get middleware(): Middleware;
1291
+ get clientOptions(): LanguageClientOptions$1;
1292
+ get protocol2CodeConverter(): Converter;
1293
+ get code2ProtocolConverter(): Converter$1;
1294
+ get onTelemetry(): Event$1<any>;
1295
+ get onDidChangeState(): Event$1<StateChangeEvent>;
1296
+ get outputChannel(): OutputChannel;
1297
+ get traceOutputChannel(): OutputChannel;
1298
+ get diagnostics(): DiagnosticCollection | undefined;
1299
+ get state(): State;
1300
+ private get $state();
1301
+ private set $state(value);
1302
+ private getPublicState;
1303
+ get initializeResult(): InitializeResult | undefined;
1304
+ sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken$1): Promise<R>;
1305
+ sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken$1): Promise<R>;
1306
+ sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken$1): Promise<R>;
1307
+ sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken$1): Promise<R>;
1308
+ sendRequest<R>(method: string, token?: CancellationToken$1): Promise<R>;
1309
+ sendRequest<R>(method: string, param: any, token?: CancellationToken$1): Promise<R>;
1310
+ onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable$1;
1311
+ onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable$1;
1312
+ onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable$1;
1313
+ onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable$1;
1314
+ onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable$1;
1315
+ sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
1316
+ sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
1317
+ sendNotification(type: NotificationType0): Promise<void>;
1318
+ sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
1319
+ sendNotification(method: string): Promise<void>;
1320
+ sendNotification(method: string, params: any): Promise<void>;
1321
+ onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable$1;
1322
+ onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable$1;
1323
+ onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable$1;
1324
+ onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable$1;
1325
+ onNotification(method: string, handler: GenericNotificationHandler): Disposable$1;
1326
+ sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
1327
+ onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable$1;
1328
+ createDefaultErrorHandler(maxRestartCount?: number): ErrorHandler;
1329
+ setTrace(value: Trace): Promise<void>;
1330
+ private data2String;
1331
+ info(message: string, data?: any, showNotification?: boolean): void;
1332
+ warn(message: string, data?: any, showNotification?: boolean): void;
1333
+ error(message: string, data?: any, showNotification?: boolean | 'force'): void;
1334
+ private showNotificationMessage;
1335
+ private logTrace;
1336
+ private logObjectTrace;
1337
+ needsStart(): boolean;
1338
+ needsStop(): boolean;
1339
+ private activeConnection;
1340
+ isRunning(): boolean;
1341
+ start(): Promise<void>;
1342
+ private createOnStartPromise;
1343
+ private initialize;
1344
+ private doInitialize;
1345
+ private _clientGetRootPath;
1346
+ stop(timeout?: number): Promise<void>;
1347
+ suspend(): Promise<void>;
1348
+ private shutdown;
1349
+ private cleanUp;
1350
+ private cleanUpChannel;
1351
+ private notifyFileEvent;
1352
+ private _didChangeTextDocumentFeature;
1353
+ private forceDocumentSync;
1354
+ private _diagnosticQueue;
1355
+ private _diagnosticQueueState;
1356
+ private handleDiagnostics;
1357
+ private triggerDiagnosticQueue;
1358
+ private workDiagnosticQueue;
1359
+ private setDiagnostics;
1360
+ protected abstract getLocale(): string;
1361
+ protected abstract createMessageTransports(encoding: string): Promise<MessageTransports>;
1362
+ private $start;
1363
+ private createConnection;
1364
+ protected handleConnectionClosed(): void;
1365
+ private handleConnectionError;
1366
+ private hookConfigurationChanged;
1367
+ private refreshTrace;
1368
+ private hookFileEvents;
1369
+ private readonly _features;
1370
+ private readonly _dynamicFeatures;
1371
+ registerFeatures(features: (StaticFeature | DynamicFeature<any>)[]): void;
1372
+ registerFeature(feature: StaticFeature | DynamicFeature<any>): void;
1373
+ getFeature(request: typeof DidOpenTextDocumentNotification.method): DidOpenTextDocumentFeatureShape;
1374
+ getFeature(request: typeof DidChangeTextDocumentNotification.method): DidChangeTextDocumentFeatureShape;
1375
+ getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>;
1376
+ getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => ProviderResult<TextEdit[]>>;
1377
+ getFeature(request: typeof DidSaveTextDocumentNotification.method): DidSaveTextDocumentFeatureShape;
1378
+ getFeature(request: typeof DidCloseTextDocumentNotification.method): DidCloseTextDocumentFeatureShape;
1379
+ getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
1380
+ send: (event: FileCreateEvent) => Promise<void>;
1381
+ };
1382
+ getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
1383
+ send: (event: FileRenameEvent) => Promise<void>;
1384
+ };
1385
+ getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
1386
+ send: (event: FileDeleteEvent) => Promise<void>;
1387
+ };
1388
+ getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
1389
+ send: (event: FileWillCreateEvent) => Promise<void>;
1390
+ };
1391
+ getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
1392
+ send: (event: FileWillRenameEvent) => Promise<void>;
1393
+ };
1394
+ getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
1395
+ send: (event: FileWillDeleteEvent) => Promise<void>;
1396
+ };
1397
+ getFeature(request: typeof CompletionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CompletionItemProvider>;
1398
+ getFeature(request: typeof HoverRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<HoverProvider>;
1399
+ getFeature(request: typeof SignatureHelpRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SignatureHelpProvider>;
1400
+ getFeature(request: typeof DefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DefinitionProvider>;
1401
+ getFeature(request: typeof ReferencesRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ReferenceProvider>;
1402
+ getFeature(request: typeof DocumentHighlightRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentHighlightProvider>;
1403
+ getFeature(request: typeof CodeActionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeActionProvider>;
1404
+ getFeature(request: typeof CodeLensRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeLensProviderShape>;
1405
+ getFeature(request: typeof DocumentFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentFormattingEditProvider>;
1406
+ getFeature(request: typeof DocumentRangeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentRangeFormattingEditProvider>;
1407
+ getFeature(request: typeof DocumentOnTypeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<OnTypeFormattingEditProvider>;
1408
+ getFeature(request: typeof RenameRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<RenameProvider>;
1409
+ getFeature(request: typeof DocumentSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentSymbolProvider>;
1410
+ getFeature(request: typeof DocumentLinkRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentLinkProvider>;
1411
+ getFeature(request: typeof DocumentColorRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentColorProvider>;
1412
+ getFeature(request: typeof DeclarationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DeclarationProvider>;
1413
+ getFeature(request: typeof FoldingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<FoldingRangeProvider>;
1414
+ getFeature(request: typeof ImplementationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ImplementationProvider>;
1415
+ getFeature(request: typeof SelectionRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SelectionRangeProvider>;
1416
+ getFeature(request: typeof TypeDefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeDefinitionProvider>;
1417
+ getFeature(request: typeof CallHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CallHierarchyProvider>;
1418
+ getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviderShape>;
1419
+ getFeature(request: typeof LinkedEditingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<LinkedEditingRangeProvider>;
1420
+ getFeature(request: typeof TypeHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeHierarchyProvider>;
1421
+ getFeature(request: typeof InlineValueRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlineValueProviderShape>;
1422
+ getFeature(request: typeof InlayHintRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlayHintsProviderShape>;
1423
+ getFeature(request: typeof WorkspaceSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & WorkspaceProviderFeature<WorkspaceSymbolProvider>;
1424
+ getFeature(request: typeof DocumentDiagnosticRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DiagnosticProviderShape> | undefined;
1425
+ getFeature(request: typeof NotebookDocumentSyncRegistrationType.method): DynamicFeature<NotebookDocumentSyncRegistrationOptions> & NotebookDocumentProviderShape | undefined;
1426
+ hasDedicatedTextSynchronizationFeature(textDocument: TextDocument): boolean;
1427
+ protected registerBuiltinFeatures(): void;
1428
+ registerProposedFeatures(): void;
1429
+ protected fillInitializeParams(params: InitializeParams): void;
1430
+ private computeClientCapabilities;
1431
+ private initializeFeatures;
1432
+ private handleRegistrationRequest;
1433
+ private handleUnregistrationRequest;
1434
+ private workspaceEditLock;
1435
+ private handleApplyWorkspaceEdit;
1436
+ private static RequestsToCancelOnContentModified;
1437
+ handleFailedRequest<T>(type: MessageSignature, token: CancellationToken$1 | undefined, error: any, defaultValue: T, showNotification?: boolean): T;
1438
+ }
8
1439
 
9
1440
  interface IConnectionProvider {
10
1441
  get(encoding: string): Promise<MessageTransports>;
11
1442
  }
12
1443
  declare class MonacoLanguageClient extends BaseLanguageClient {
13
- static bypassConversion: (result: any, token?: vscode.CancellationToken) => any;
1444
+ static bypassConversion: (result: any, token?: code.CancellationToken) => any;
14
1445
  protected readonly connectionProvider: IConnectionProvider;
15
1446
  constructor({ id, name, clientOptions, connectionProvider }: MonacoLanguageClient.Options);
16
1447
  protected createMessageTransports(encoding: string): Promise<MessageTransports>;
@@ -88,11 +1519,11 @@ declare class LanguageClientManager implements LanguageClient {
88
1519
  private notifyStatusChanged;
89
1520
  isConnected(): boolean;
90
1521
  dispose(): Promise<void>;
91
- get onDidChangeStatus(): Event<StatusChangeEvent>;
92
- get onDidClose(): Event<void>;
93
- get onWillShutdown(): Event<WillShutdownParams>;
94
- get onError(): Event<Error>;
95
- isModelManaged(document: vscode.TextDocument): boolean;
1522
+ get onDidChangeStatus(): Event$1<StatusChangeEvent>;
1523
+ get onDidClose(): Event$1<void>;
1524
+ get onWillShutdown(): Event$1<WillShutdownParams>;
1525
+ get onError(): Event$1<Error>;
1526
+ isModelManaged(document: code.TextDocument): boolean;
96
1527
  isDisposed(): boolean;
97
1528
  private handleClose;
98
1529
  private handleError;
@@ -123,7 +1554,7 @@ interface Infrastructure {
123
1554
  /**
124
1555
  * Workspace folders
125
1556
  */
126
- workspaceFolders?: typeof vscode.workspace.workspaceFolders;
1557
+ workspaceFolders?: typeof code.workspace.workspaceFolders;
127
1558
  /**
128
1559
  * Does a mutualization proxy will be used, it means we don't need to load configurations for this server
129
1560
  */
@@ -134,7 +1565,7 @@ interface Infrastructure {
134
1565
  * @param reason The reason of the save
135
1566
  * @param languageClient The languageclient we're trying to save the file to
136
1567
  */
137
- saveFileContent?(document: vscode.TextDocument, reason: vscode.TextDocumentSaveReason, languageClient: LanguageClientManager): Promise<void>;
1568
+ saveFileContent?(document: code.TextDocument, reason: code.TextDocumentSaveReason, languageClient: LanguageClientManager): Promise<void>;
138
1569
  /**
139
1570
  * Get a text file content as a model
140
1571
  * @param resource the Uri of the file
@@ -177,8 +1608,8 @@ declare abstract class CodinGameInfrastructure implements Infrastructure {
177
1608
  useMutualizedProxy(languageClientId: LanguageClientId, options: LanguageClientOptions): boolean;
178
1609
  readonly automaticTextDocumentUpdate = false;
179
1610
  readonly rootUri = "file:///tmp/project";
180
- readonly workspaceFolders: typeof vscode.workspace.workspaceFolders;
181
- saveFileContent(document: vscode.TextDocument, reason: TextDocumentSaveReason, languageClient: LanguageClientManager): Promise<void>;
1611
+ readonly workspaceFolders: typeof code.workspace.workspaceFolders;
1612
+ saveFileContent(document: code.TextDocument, reason: TextDocumentSaveReason, languageClient: LanguageClientManager): Promise<void>;
182
1613
  getFileContent(resource: monaco.Uri, languageClient: LanguageClientManager): Promise<monaco.editor.ITextModel | null>;
183
1614
  /**
184
1615
  * A function which returns a valid JWT token to use to connect to the server
@@ -194,4 +1625,4 @@ declare abstract class CodinGameInfrastructure implements Infrastructure {
194
1625
  */
195
1626
  declare function loadExtensionConfigurations(forLanguageClientIds: LanguageClientId[], useMutualizedProxy: boolean): Promise<void>;
196
1627
 
197
- export { CodinGameInfrastructure, Infrastructure, LanguageClientId, LanguageClientManager, LanguageClientManagerOptions, LanguageClientOptions, StaticLanguageClientId, StatusChangeEvent, WillShutdownParams, createLanguageClientManager, loadExtensionConfigurations, registerLanguageClient };
1628
+ export { CodinGameInfrastructure, Infrastructure, LanguageClientId, LanguageClientManager, LanguageClientManagerOptions, LanguageClientOptions, MessageTransports, StaticLanguageClientId, StatusChangeEvent, WillShutdownParams, createLanguageClientManager, loadExtensionConfigurations, registerLanguageClient };