import { Disposable, TextDocument, ProviderResult, Range as VRange, Color as VColor, ColorPresentation as VColorPresentation, ColorInformation as VColorInformation, DocumentColorProvider } from 'vscode'; import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, DocumentColorRegistrationOptions, DocumentColorOptions } from 'vscode-languageserver-protocol'; import { TextDocumentLanguageFeature, FeatureClient } from './features'; export interface ProvideDocumentColorsSignature { (document: TextDocument, token: CancellationToken): ProviderResult; } export interface ProvideColorPresentationSignature { (color: VColor, context: { document: TextDocument; range: VRange; }, token: CancellationToken): ProviderResult; } export interface ColorProviderMiddleware { provideDocumentColors?: (this: void, document: TextDocument, token: CancellationToken, next: ProvideDocumentColorsSignature) => ProviderResult; provideColorPresentations?: (this: void, color: VColor, context: { document: TextDocument; range: VRange; }, token: CancellationToken, next: ProvideColorPresentationSignature) => ProviderResult; } export declare class ColorProviderFeature extends TextDocumentLanguageFeature { constructor(client: FeatureClient); fillClientCapabilities(capabilities: ClientCapabilities): void; initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void; protected registerLanguageProvider(options: DocumentColorRegistrationOptions): [Disposable, DocumentColorProvider]; }