import { TextDocument, Disposable, Position as VPosition, CompletionContext as VCompletionContext, CancellationToken, ProviderResult, CompletionItem as VCompletionItem, CompletionList as VCompletionList, CompletionItemProvider } from 'vscode'; import { ClientCapabilities, CompletionOptions, CompletionRegistrationOptions, DocumentSelector, ServerCapabilities } from 'vscode-languageserver-protocol'; import { FeatureClient, TextDocumentLanguageFeature } from './features'; export interface ProvideCompletionItemsSignature { (this: void, document: TextDocument, position: VPosition, context: VCompletionContext, token: CancellationToken): ProviderResult; } export interface ResolveCompletionItemSignature { (this: void, item: VCompletionItem, token: CancellationToken): ProviderResult; } export interface CompletionMiddleware { provideCompletionItem?: (this: void, document: TextDocument, position: VPosition, context: VCompletionContext, token: CancellationToken, next: ProvideCompletionItemsSignature) => ProviderResult; resolveCompletionItem?: (this: void, item: VCompletionItem, token: CancellationToken, next: ResolveCompletionItemSignature) => ProviderResult; } export declare class CompletionItemFeature extends TextDocumentLanguageFeature { private labelDetailsSupport; constructor(client: FeatureClient); fillClientCapabilities(capabilities: ClientCapabilities): void; initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; protected registerLanguageProvider(options: CompletionRegistrationOptions, id: string): [Disposable, CompletionItemProvider]; }