1 | import { Disposable, TextDocument, ProviderResult, Range as VRange, InlayHint as VInlayHint, InlayHintsProvider, EventEmitter } from 'vscode';
|
2 | import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, InlayHintOptions, InlayHintRegistrationOptions } from 'vscode-languageserver-protocol';
|
3 | import { TextDocumentLanguageFeature, FeatureClient } from './features';
|
4 | export type ProvideInlayHintsSignature = (this: void, document: TextDocument, viewPort: VRange, token: CancellationToken) => ProviderResult<VInlayHint[]>;
|
5 | export type ResolveInlayHintSignature = (this: void, item: VInlayHint, token: CancellationToken) => ProviderResult<VInlayHint>;
|
6 | export type InlayHintsMiddleware = {
|
7 | provideInlayHints?: (this: void, document: TextDocument, viewPort: VRange, token: CancellationToken, next: ProvideInlayHintsSignature) => ProviderResult<VInlayHint[]>;
|
8 | resolveInlayHint?: (this: void, item: VInlayHint, token: CancellationToken, next: ResolveInlayHintSignature) => ProviderResult<VInlayHint>;
|
9 | };
|
10 | export type InlayHintsProviderShape = {
|
11 | provider: InlayHintsProvider;
|
12 | onDidChangeInlayHints: EventEmitter<void>;
|
13 | };
|
14 | export declare class InlayHintsFeature extends TextDocumentLanguageFeature<boolean | InlayHintOptions, InlayHintRegistrationOptions, InlayHintsProviderShape, InlayHintsMiddleware> {
|
15 | constructor(client: FeatureClient<InlayHintsMiddleware>);
|
16 | fillClientCapabilities(capabilities: ClientCapabilities): void;
|
17 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
18 | protected registerLanguageProvider(options: InlayHintRegistrationOptions): [Disposable, InlayHintsProviderShape];
|
19 | private registerProvider;
|
20 | }
|