UNPKG

28.5 kBTypeScriptView Raw
1import { TextDocument, Disposable, OutputChannel, DiagnosticCollection, Diagnostic as VDiagnostic, Uri, CancellationToken, WorkspaceFolder as VWorkspaceFolder, FileCreateEvent, FileRenameEvent, FileDeleteEvent, FileWillCreateEvent, FileWillRenameEvent, FileWillDeleteEvent, CompletionItemProvider, HoverProvider, SignatureHelpProvider, DefinitionProvider, ReferenceProvider, DocumentHighlightProvider, CodeActionProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, RenameProvider, DocumentSymbolProvider, DocumentLinkProvider, DeclarationProvider, ImplementationProvider, DocumentColorProvider, SelectionRangeProvider, TypeDefinitionProvider, CallHierarchyProvider, LinkedEditingRangeProvider, TypeHierarchyProvider, WorkspaceSymbolProvider, ProviderResult, TextEdit as VTextEdit, InlineCompletionItemProvider } from 'vscode';
2import { Message, MessageSignature, ResponseError, RequestType0, RequestType, NotificationType0, NotificationType, ProtocolRequestType, ProtocolRequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, ProtocolNotificationType, ProtocolNotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, MessageReader, MessageWriter, Trace, Event, RegistrationRequest, RegistrationParams, UnregistrationRequest, UnregistrationParams, InitializeParams, InitializeResult, DocumentSelector, DidChangeTextDocumentNotification, FileEvent, ProgressType, ProgressToken, ShowDocumentRequest, ShowDocumentParams, ShowDocumentResult, CancellationStrategy, InitializeError, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, DidOpenTextDocumentNotification, WillSaveTextDocumentNotification, WillSaveTextDocumentWaitUntilRequest, DidSaveTextDocumentNotification, DidCloseTextDocumentNotification, DidCreateFilesNotification, DidRenameFilesNotification, DidDeleteFilesNotification, WillRenameFilesRequest, WillCreateFilesRequest, 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, TextDocumentRegistrationOptions, FileOperationRegistrationOptions, DocumentDiagnosticRequest, NotebookDocumentSyncRegistrationType, NotebookDocumentSyncRegistrationOptions, MessageStrategy, InlineCompletionRequest, InlineCompletionRegistrationOptions, ExecuteCommandRequest, ExecuteCommandOptions } from 'vscode-languageserver-protocol';
3import * as c2p from './codeConverter';
4import * as p2c from './protocolConverter';
5import { DynamicFeature, FeatureClient, TextDocumentSendFeature, StaticFeature, TextDocumentProviderFeature, WorkspaceProviderFeature } from './features';
6import { DiagnosticProviderMiddleware, DiagnosticProviderShape, $DiagnosticPullOptions } from './diagnostic';
7import { NotebookDocumentMiddleware, $NotebookDocumentOptions, NotebookDocumentProviderShape } from './notebook';
8import { ConfigurationMiddleware, $ConfigurationOptions, DidChangeConfigurationMiddleware } from './configuration';
9import { DidChangeTextDocumentFeatureShape, DidCloseTextDocumentFeatureShape, DidOpenTextDocumentFeatureShape, DidSaveTextDocumentFeatureShape, TextDocumentSynchronizationMiddleware } from './textSynchronization';
10import { CompletionMiddleware } from './completion';
11import { HoverMiddleware } from './hover';
12import { DefinitionMiddleware } from './definition';
13import { SignatureHelpMiddleware } from './signatureHelp';
14import { DocumentHighlightMiddleware } from './documentHighlight';
15import { DocumentSymbolMiddleware } from './documentSymbol';
16import { WorkspaceSymbolMiddleware } from './workspaceSymbol';
17import { ReferencesMiddleware } from './reference';
18import { TypeDefinitionMiddleware } from './typeDefinition';
19import { ImplementationMiddleware } from './implementation';
20import { ColorProviderMiddleware } from './colorProvider';
21import { CodeActionMiddleware } from './codeAction';
22import { CodeLensMiddleware, CodeLensProviderShape } from './codeLens';
23import { FormattingMiddleware } from './formatting';
24import { RenameMiddleware } from './rename';
25import { DocumentLinkMiddleware } from './documentLink';
26import { ExecuteCommandMiddleware } from './executeCommand';
27import { FoldingRangeProviderMiddleware, FoldingRangeProviderShape } from './foldingRange';
28import { DeclarationMiddleware } from './declaration';
29import { SelectionRangeProviderMiddleware } from './selectionRange';
30import { CallHierarchyMiddleware } from './callHierarchy';
31import { SemanticTokensMiddleware, SemanticTokensProviderShape } from './semanticTokens';
32import { LinkedEditingRangeMiddleware } from './linkedEditingRange';
33import { TypeHierarchyMiddleware } from './typeHierarchy';
34import { InlineValueMiddleware, InlineValueProviderShape } from './inlineValue';
35import { InlayHintsMiddleware, InlayHintsProviderShape } from './inlayHint';
36import { WorkspaceFolderMiddleware } from './workspaceFolder';
37import { FileOperationsMiddleware } from './fileOperations';
38import { InlineCompletionMiddleware } from './inlineCompletion';
39/**
40 * Controls when the output channel is revealed.
41 */
42export declare enum RevealOutputChannelOn {
43 Debug = 0,
44 Info = 1,
45 Warn = 2,
46 Error = 3,
47 Never = 4
48}
49/**
50 * A handler that is invoked when the initialization of the server failed.
51 */
52export type InitializationFailedHandler =
53/**
54 * @param error The error returned from the server
55 * @returns if true is returned the client tries to reinitialize the server.
56 * Implementors of a handler are responsible to not initialize the server
57 * infinitely. Return false if initialization should stop and an error
58 * should be reported.
59 */
60(error: ResponseError<InitializeError> | Error | any) => boolean;
61/**
62 * An action to be performed when the connection is producing errors.
63 */
64export declare enum ErrorAction {
65 /**
66 * Continue running the server.
67 */
68 Continue = 1,
69 /**
70 * Shutdown the server.
71 */
72 Shutdown = 2
73}
74export type ErrorHandlerResult = {
75 /**
76 * The action to take.
77 */
78 action: ErrorAction;
79 /**
80 * An optional message to be presented to the user.
81 */
82 message?: string;
83 /**
84 * If set to true the client assumes that the corresponding
85 * error handler has presented an appropriate message to the
86 * user and the message will only be log to the client's
87 * output channel.
88 */
89 handled?: boolean;
90};
91/**
92 * An action to be performed when the connection to a server got closed.
93 */
94export declare enum CloseAction {
95 /**
96 * Don't restart the server. The connection stays closed.
97 */
98 DoNotRestart = 1,
99 /**
100 * Restart the server.
101 */
102 Restart = 2
103}
104export type CloseHandlerResult = {
105 /**
106 * The action to take.
107 */
108 action: CloseAction;
109 /**
110 * An optional message to be presented to the user.
111 */
112 message?: string;
113 /**
114 * If set to true the client assumes that the corresponding
115 * close handler has presented an appropriate message to the
116 * user and the message will only be log to the client's
117 * output channel.
118 */
119 handled?: boolean;
120};
121/**
122 * A plugable error handler that is invoked when the connection is either
123 * producing errors or got closed.
124 */
125export interface ErrorHandler {
126 /**
127 * An error has occurred while writing or reading from the connection.
128 *
129 * @param error - the error received
130 * @param message - the message to be delivered to the server if know.
131 * @param count - a count indicating how often an error is received. Will
132 * be reset if a message got successfully send or received.
133 */
134 error(error: Error, message: Message | undefined, count: number | undefined): ErrorHandlerResult | Promise<ErrorHandlerResult>;
135 /**
136 * The connection to the server got closed.
137 */
138 closed(): CloseHandlerResult | Promise<CloseHandlerResult>;
139}
140/**
141 * Signals in which state the language client is in.
142 */
143export declare enum State {
144 /**
145 * The client is stopped or got never started.
146 */
147 Stopped = 1,
148 /**
149 * The client is starting but not ready yet.
150 */
151 Starting = 3,
152 /**
153 * The client is running and ready.
154 */
155 Running = 2
156}
157/**
158 * An event signaling a state change.
159 */
160export interface StateChangeEvent {
161 oldState: State;
162 newState: State;
163}
164export declare enum SuspendMode {
165 /**
166 * Don't allow suspend mode.
167 */
168 off = "off",
169 /**
170 * Support suspend mode even if not all
171 * registered providers have a corresponding
172 * activation listener.
173 */
174 on = "on"
175}
176export type SuspendOptions = {
177 /**
178 * Whether suspend mode is supported. If suspend mode is allowed
179 * the client will stop a running server when going into suspend mode.
180 * If omitted defaults to SuspendMode.off;
181 */
182 mode?: SuspendMode;
183 /**
184 * A callback that is invoked before actually suspending
185 * the server. If `false` is returned the client will not continue
186 * suspending the server.
187 */
188 callback?: () => Promise<boolean>;
189 /**
190 * The interval in milliseconds used to check if the server
191 * can be suspended. If the check passes three times in a row
192 * (e.g. the server can be suspended for 3 * interval ms) the
193 * server is suspended. Defaults to 60000ms, which is also the
194 * minimum allowed value.
195 */
196 interval?: number;
197};
198export interface DidChangeWatchedFileSignature {
199 (this: void, event: FileEvent): Promise<void>;
200}
201type _WorkspaceMiddleware = {
202 didChangeWatchedFile?: (this: void, event: FileEvent, next: DidChangeWatchedFileSignature) => Promise<void>;
203};
204export type WorkspaceMiddleware = _WorkspaceMiddleware & ConfigurationMiddleware & DidChangeConfigurationMiddleware & WorkspaceFolderMiddleware & FileOperationsMiddleware;
205interface _WindowMiddleware {
206 showDocument?: (this: void, params: ShowDocumentParams, next: ShowDocumentRequest.HandlerSignature) => Promise<ShowDocumentResult>;
207}
208export type WindowMiddleware = _WindowMiddleware;
209export interface HandleDiagnosticsSignature {
210 (this: void, uri: Uri, diagnostics: VDiagnostic[]): void;
211}
212export interface HandleWorkDoneProgressSignature {
213 (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd): void;
214}
215interface _Middleware {
216 handleDiagnostics?: (this: void, uri: Uri, diagnostics: VDiagnostic[], next: HandleDiagnosticsSignature) => void;
217 handleWorkDoneProgress?: (this: void, token: ProgressToken, params: WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd, next: HandleWorkDoneProgressSignature) => void;
218 handleRegisterCapability?: (this: void, params: RegistrationParams, next: RegistrationRequest.HandlerSignature) => Promise<void>;
219 handleUnregisterCapability?: (this: void, params: UnregistrationParams, next: UnregistrationRequest.HandlerSignature) => Promise<void>;
220 workspace?: WorkspaceMiddleware;
221 window?: WindowMiddleware;
222}
223interface GeneralMiddleware {
224 sendRequest?<P, R>(this: void, type: string | MessageSignature, param: P | undefined, token: CancellationToken | undefined, next: (type: string | MessageSignature, param?: P, token?: CancellationToken) => Promise<R>): Promise<R>;
225 sendNotification?<R>(this: void, type: string | MessageSignature, next: (type: string | MessageSignature, params?: R) => Promise<void>, params: R): Promise<void>;
226}
227/**
228 * The Middleware lets extensions intercept the request and notifications send and received
229 * from the server
230 */
231export 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 & InlineCompletionMiddleware & GeneralMiddleware;
232export type LanguageClientOptions = {
233 documentSelector?: DocumentSelector | string[];
234 diagnosticCollectionName?: string;
235 outputChannel?: OutputChannel;
236 outputChannelName?: string;
237 traceOutputChannel?: OutputChannel;
238 revealOutputChannelOn?: RevealOutputChannelOn;
239 /**
240 * The encoding use to read stdout and stderr. Defaults
241 * to 'utf8' if omitted.
242 */
243 stdioEncoding?: string;
244 initializationOptions?: any | (() => any);
245 initializationFailedHandler?: InitializationFailedHandler;
246 progressOnInitialization?: boolean;
247 errorHandler?: ErrorHandler;
248 middleware?: Middleware;
249 uriConverters?: {
250 code2Protocol: c2p.URIConverter;
251 protocol2Code: p2c.URIConverter;
252 };
253 workspaceFolder?: VWorkspaceFolder;
254 connectionOptions?: {
255 cancellationStrategy?: CancellationStrategy;
256 messageStrategy?: MessageStrategy;
257 maxRestartCount?: number;
258 };
259 markdown?: {
260 isTrusted?: boolean | {
261 readonly enabledCommands: readonly string[];
262 };
263 supportHtml?: boolean;
264 };
265} & $NotebookDocumentOptions & $DiagnosticPullOptions & $ConfigurationOptions;
266export interface MessageTransports {
267 reader: MessageReader;
268 writer: MessageWriter;
269 detached?: boolean;
270}
271export declare namespace MessageTransports {
272 function is(value: any): value is MessageTransports;
273}
274export declare abstract class BaseLanguageClient implements FeatureClient<Middleware, LanguageClientOptions> {
275 private _id;
276 private _name;
277 private _clientOptions;
278 private _state;
279 private _onStart;
280 private _onStop;
281 private _connection;
282 private _idleInterval;
283 private readonly _ignoredRegistrations;
284 private readonly _listeners;
285 private _disposed;
286 private readonly _notificationHandlers;
287 private readonly _notificationDisposables;
288 private readonly _pendingNotificationHandlers;
289 private readonly _requestHandlers;
290 private readonly _requestDisposables;
291 private readonly _pendingRequestHandlers;
292 private readonly _progressHandlers;
293 private readonly _pendingProgressHandlers;
294 private readonly _progressDisposables;
295 private _initializeResult;
296 private _outputChannel;
297 private _disposeOutputChannel;
298 private _traceOutputChannel;
299 private _capabilities;
300 private _diagnostics;
301 private _syncedDocuments;
302 private _didChangeTextDocumentFeature;
303 private readonly _pendingOpenNotifications;
304 private readonly _pendingChangeSemaphore;
305 private readonly _pendingChangeDelayer;
306 private _fileEvents;
307 private _fileEventDelayer;
308 private _telemetryEmitter;
309 private _stateChangeEmitter;
310 private _trace;
311 private _traceFormat;
312 private _tracer;
313 private readonly _c2p;
314 private readonly _p2c;
315 constructor(id: string, name: string, clientOptions: LanguageClientOptions);
316 get name(): string;
317 get middleware(): Middleware;
318 get clientOptions(): LanguageClientOptions;
319 get protocol2CodeConverter(): p2c.Converter;
320 get code2ProtocolConverter(): c2p.Converter;
321 get onTelemetry(): Event<any>;
322 get onDidChangeState(): Event<StateChangeEvent>;
323 get outputChannel(): OutputChannel;
324 get traceOutputChannel(): OutputChannel;
325 get diagnostics(): DiagnosticCollection | undefined;
326 get state(): State;
327 private get $state();
328 private set $state(value);
329 private getPublicState;
330 get initializeResult(): InitializeResult | undefined;
331 sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken): Promise<R>;
332 sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken): Promise<R>;
333 sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken): Promise<R>;
334 sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Promise<R>;
335 sendRequest<R>(method: string, token?: CancellationToken): Promise<R>;
336 sendRequest<R>(method: string, param: any, token?: CancellationToken): Promise<R>;
337 onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable;
338 onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable;
339 onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable;
340 onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable;
341 onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable;
342 sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
343 sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
344 sendNotification(type: NotificationType0): Promise<void>;
345 sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
346 sendNotification(method: string): Promise<void>;
347 sendNotification(method: string, params: any): Promise<void>;
348 onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable;
349 onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable;
350 onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable;
351 onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable;
352 onNotification(method: string, handler: GenericNotificationHandler): Disposable;
353 sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
354 onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable;
355 createDefaultErrorHandler(maxRestartCount?: number): ErrorHandler;
356 setTrace(value: Trace): Promise<void>;
357 private data2String;
358 debug(message: string, data?: any, showNotification?: boolean): void;
359 info(message: string, data?: any, showNotification?: boolean): void;
360 warn(message: string, data?: any, showNotification?: boolean): void;
361 error(message: string, data?: any, showNotification?: boolean | 'force'): void;
362 private logOutputMessage;
363 private showNotificationMessage;
364 private logTrace;
365 private logObjectTrace;
366 needsStart(): boolean;
367 needsStop(): boolean;
368 private activeConnection;
369 isRunning(): boolean;
370 start(): Promise<void>;
371 private createOnStartPromise;
372 private initialize;
373 private doInitialize;
374 private _clientGetRootPath;
375 stop(timeout?: number): Promise<void>;
376 dispose(timeout?: number): Promise<void>;
377 private shutdown;
378 private cleanUp;
379 private cleanUpChannel;
380 private notifyFileEvent;
381 private sendPendingFullTextDocumentChanges;
382 private triggerPendingChangeDelivery;
383 private _diagnosticQueue;
384 private _diagnosticQueueState;
385 private handleDiagnostics;
386 private triggerDiagnosticQueue;
387 private workDiagnosticQueue;
388 private setDiagnostics;
389 protected getLocale(): string;
390 protected abstract createMessageTransports(encoding: string): Promise<MessageTransports>;
391 private $start;
392 private createConnection;
393 protected handleConnectionClosed(): Promise<void>;
394 private handleConnectionError;
395 private hookConfigurationChanged;
396 private refreshTrace;
397 private hookFileEvents;
398 private readonly _features;
399 private readonly _dynamicFeatures;
400 registerFeatures(features: (StaticFeature | DynamicFeature<any>)[]): void;
401 registerFeature(feature: StaticFeature | DynamicFeature<any>): void;
402 getFeature(request: typeof DidOpenTextDocumentNotification.method): DidOpenTextDocumentFeatureShape;
403 getFeature(request: typeof DidChangeTextDocumentNotification.method): DidChangeTextDocumentFeatureShape;
404 getFeature(request: typeof WillSaveTextDocumentNotification.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => Promise<void>>;
405 getFeature(request: typeof WillSaveTextDocumentWaitUntilRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentSendFeature<(textDocument: TextDocument) => ProviderResult<VTextEdit[]>>;
406 getFeature(request: typeof DidSaveTextDocumentNotification.method): DidSaveTextDocumentFeatureShape;
407 getFeature(request: typeof DidCloseTextDocumentNotification.method): DidCloseTextDocumentFeatureShape;
408 getFeature(request: typeof DidCreateFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
409 send: (event: FileCreateEvent) => Promise<void>;
410 };
411 getFeature(request: typeof DidRenameFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
412 send: (event: FileRenameEvent) => Promise<void>;
413 };
414 getFeature(request: typeof DidDeleteFilesNotification.method): DynamicFeature<FileOperationRegistrationOptions> & {
415 send: (event: FileDeleteEvent) => Promise<void>;
416 };
417 getFeature(request: typeof WillCreateFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
418 send: (event: FileWillCreateEvent) => Promise<void>;
419 };
420 getFeature(request: typeof WillRenameFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
421 send: (event: FileWillRenameEvent) => Promise<void>;
422 };
423 getFeature(request: typeof WillDeleteFilesRequest.method): DynamicFeature<FileOperationRegistrationOptions> & {
424 send: (event: FileWillDeleteEvent) => Promise<void>;
425 };
426 getFeature(request: typeof CompletionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CompletionItemProvider>;
427 getFeature(request: typeof HoverRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<HoverProvider>;
428 getFeature(request: typeof SignatureHelpRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SignatureHelpProvider>;
429 getFeature(request: typeof DefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DefinitionProvider>;
430 getFeature(request: typeof ReferencesRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ReferenceProvider>;
431 getFeature(request: typeof DocumentHighlightRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentHighlightProvider>;
432 getFeature(request: typeof CodeActionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeActionProvider>;
433 getFeature(request: typeof CodeLensRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CodeLensProviderShape>;
434 getFeature(request: typeof DocumentFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentFormattingEditProvider>;
435 getFeature(request: typeof DocumentRangeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentRangeFormattingEditProvider>;
436 getFeature(request: typeof DocumentOnTypeFormattingRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<OnTypeFormattingEditProvider>;
437 getFeature(request: typeof RenameRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<RenameProvider>;
438 getFeature(request: typeof DocumentSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentSymbolProvider>;
439 getFeature(request: typeof DocumentLinkRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentLinkProvider>;
440 getFeature(request: typeof DocumentColorRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DocumentColorProvider>;
441 getFeature(request: typeof DeclarationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DeclarationProvider>;
442 getFeature(request: typeof FoldingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<FoldingRangeProviderShape>;
443 getFeature(request: typeof ImplementationRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<ImplementationProvider>;
444 getFeature(request: typeof SelectionRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SelectionRangeProvider>;
445 getFeature(request: typeof TypeDefinitionRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeDefinitionProvider>;
446 getFeature(request: typeof CallHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<CallHierarchyProvider>;
447 getFeature(request: typeof SemanticTokensRegistrationType.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<SemanticTokensProviderShape>;
448 getFeature(request: typeof LinkedEditingRangeRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<LinkedEditingRangeProvider>;
449 getFeature(request: typeof TypeHierarchyPrepareRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<TypeHierarchyProvider>;
450 getFeature(request: typeof InlineValueRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlineValueProviderShape>;
451 getFeature(request: typeof InlayHintRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<InlayHintsProviderShape>;
452 getFeature(request: typeof WorkspaceSymbolRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & WorkspaceProviderFeature<WorkspaceSymbolProvider>;
453 getFeature(request: typeof DocumentDiagnosticRequest.method): DynamicFeature<TextDocumentRegistrationOptions> & TextDocumentProviderFeature<DiagnosticProviderShape> | undefined;
454 getFeature(request: typeof NotebookDocumentSyncRegistrationType.method): DynamicFeature<NotebookDocumentSyncRegistrationOptions> & NotebookDocumentProviderShape | undefined;
455 getFeature(request: typeof InlineCompletionRequest.method): DynamicFeature<InlineCompletionRegistrationOptions> & TextDocumentProviderFeature<InlineCompletionItemProvider>;
456 getFeature(request: typeof ExecuteCommandRequest.method): DynamicFeature<ExecuteCommandOptions>;
457 hasDedicatedTextSynchronizationFeature(textDocument: TextDocument): boolean;
458 protected registerBuiltinFeatures(): void;
459 registerProposedFeatures(): void;
460 protected fillInitializeParams(params: InitializeParams): void;
461 private computeClientCapabilities;
462 private initializeFeatures;
463 private handleRegistrationRequest;
464 private doRegisterCapability;
465 private handleUnregistrationRequest;
466 private doUnregisterCapability;
467 private workspaceEditLock;
468 private handleApplyWorkspaceEdit;
469 private static RequestsToCancelOnContentModified;
470 private static CancellableResolveCalls;
471 handleFailedRequest<T>(type: MessageSignature, token: CancellationToken | undefined, error: any, defaultValue: T, showNotification?: boolean): T;
472}
473export declare namespace ProposedFeatures {
474 function createAll(_client: FeatureClient<Middleware, LanguageClientOptions>): (StaticFeature | DynamicFeature<any>)[];
475}
476export {};