UNPKG

1.52 kBTypeScriptView Raw
1import { TextDocument, Disposable, CancellationToken, ProviderResult, DocumentSymbolProvider, SymbolInformation as VSymbolInformation, DocumentSymbol as VDocumentSymbol } from 'vscode';
2import { ClientCapabilities, DocumentSelector, DocumentSymbolOptions, DocumentSymbolRegistrationOptions, ServerCapabilities, SymbolKind, SymbolTag } from 'vscode-languageserver-protocol';
3import { FeatureClient, TextDocumentLanguageFeature } from './features';
4export declare const SupportedSymbolKinds: SymbolKind[];
5export declare const SupportedSymbolTags: SymbolTag[];
6export interface ProvideDocumentSymbolsSignature {
7 (this: void, document: TextDocument, token: CancellationToken): ProviderResult<VSymbolInformation[] | VDocumentSymbol[]>;
8}
9export interface DocumentSymbolMiddleware {
10 provideDocumentSymbols?: (this: void, document: TextDocument, token: CancellationToken, next: ProvideDocumentSymbolsSignature) => ProviderResult<VSymbolInformation[] | VDocumentSymbol[]>;
11}
12export declare class DocumentSymbolFeature extends TextDocumentLanguageFeature<boolean | DocumentSymbolOptions, DocumentSymbolRegistrationOptions, DocumentSymbolProvider, DocumentSymbolMiddleware> {
13 constructor(client: FeatureClient<DocumentSymbolMiddleware>);
14 fillClientCapabilities(capabilities: ClientCapabilities): void;
15 initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
16 protected registerLanguageProvider(options: DocumentSymbolRegistrationOptions): [Disposable, DocumentSymbolProvider];
17}