1 | import { Disposable, TextDocument, ProviderResult, Position as VPosition, SelectionRange as VSelectionRange, SelectionRangeProvider } from 'vscode';
|
2 | import { ClientCapabilities, CancellationToken, ServerCapabilities, DocumentSelector, SelectionRangeOptions, SelectionRangeRegistrationOptions } from 'vscode-languageserver-protocol';
|
3 | import { TextDocumentLanguageFeature, FeatureClient } from './features';
|
4 | export interface ProvideSelectionRangeSignature {
|
5 | (this: void, document: TextDocument, positions: readonly VPosition[], token: CancellationToken): ProviderResult<VSelectionRange[]>;
|
6 | }
|
7 | export interface SelectionRangeProviderMiddleware {
|
8 | provideSelectionRanges?: (this: void, document: TextDocument, positions: readonly VPosition[], token: CancellationToken, next: ProvideSelectionRangeSignature) => ProviderResult<VSelectionRange[]>;
|
9 | }
|
10 | export declare class SelectionRangeFeature extends TextDocumentLanguageFeature<boolean | SelectionRangeOptions, SelectionRangeRegistrationOptions, SelectionRangeProvider, SelectionRangeProviderMiddleware> {
|
11 | constructor(client: FeatureClient<SelectionRangeProviderMiddleware>);
|
12 | fillClientCapabilities(capabilities: ClientCapabilities): void;
|
13 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
14 | protected registerLanguageProvider(options: SelectionRangeRegistrationOptions): [Disposable, SelectionRangeProvider];
|
15 | private registerProvider;
|
16 | }
|