1 | import { TextDocument, Disposable, Position as VPosition, CancellationToken, ProviderResult, ReferenceProvider, Location as VLocation } from 'vscode';
|
2 | import { ClientCapabilities, DocumentSelector, ReferenceOptions, ReferenceRegistrationOptions, ServerCapabilities, TextDocumentRegistrationOptions } from 'vscode-languageserver-protocol';
|
3 | import { FeatureClient, TextDocumentLanguageFeature } from './features';
|
4 | export interface ProvideReferencesSignature {
|
5 | (this: void, document: TextDocument, position: VPosition, options: {
|
6 | includeDeclaration: boolean;
|
7 | }, token: CancellationToken): ProviderResult<VLocation[]>;
|
8 | }
|
9 | export interface ReferencesMiddleware {
|
10 | provideReferences?: (this: void, document: TextDocument, position: VPosition, options: {
|
11 | includeDeclaration: boolean;
|
12 | }, token: CancellationToken, next: ProvideReferencesSignature) => ProviderResult<VLocation[]>;
|
13 | }
|
14 | export declare class ReferencesFeature extends TextDocumentLanguageFeature<boolean | ReferenceOptions, ReferenceRegistrationOptions, ReferenceProvider, ReferencesMiddleware> {
|
15 | constructor(client: FeatureClient<ReferencesMiddleware>);
|
16 | fillClientCapabilities(capabilities: ClientCapabilities): void;
|
17 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
18 | protected registerLanguageProvider(options: TextDocumentRegistrationOptions): [Disposable, ReferenceProvider];
|
19 | private registerProvider;
|
20 | }
|