1 | import { TextDocument, Disposable, CancellationToken, ProviderResult, DocumentLinkProvider, DocumentLink as VDocumentLink } from 'vscode';
|
2 | import { ClientCapabilities, DocumentLinkOptions, DocumentLinkRegistrationOptions, DocumentSelector, ServerCapabilities } from 'vscode-languageserver-protocol';
|
3 | import { FeatureClient, TextDocumentLanguageFeature } from './features';
|
4 | export interface ProvideDocumentLinksSignature {
|
5 | (this: void, document: TextDocument, token: CancellationToken): ProviderResult<VDocumentLink[]>;
|
6 | }
|
7 | export interface ResolveDocumentLinkSignature {
|
8 | (this: void, link: VDocumentLink, token: CancellationToken): ProviderResult<VDocumentLink>;
|
9 | }
|
10 | export interface DocumentLinkMiddleware {
|
11 | provideDocumentLinks?: (this: void, document: TextDocument, token: CancellationToken, next: ProvideDocumentLinksSignature) => ProviderResult<VDocumentLink[]>;
|
12 | resolveDocumentLink?: (this: void, link: VDocumentLink, token: CancellationToken, next: ResolveDocumentLinkSignature) => ProviderResult<VDocumentLink>;
|
13 | }
|
14 | export declare class DocumentLinkFeature extends TextDocumentLanguageFeature<DocumentLinkOptions, DocumentLinkRegistrationOptions, DocumentLinkProvider, DocumentLinkMiddleware> {
|
15 | constructor(client: FeatureClient<DocumentLinkMiddleware>);
|
16 | fillClientCapabilities(capabilities: ClientCapabilities): void;
|
17 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
18 | protected registerLanguageProvider(options: DocumentLinkRegistrationOptions): [Disposable, DocumentLinkProvider];
|
19 | }
|