UNPKG

1.5 kBTypeScriptView Raw
1import { Disposable, CancellationToken, ProviderResult, SymbolInformation as VSymbolInformation, WorkspaceSymbolProvider } from 'vscode';
2import { ClientCapabilities, ServerCapabilities, WorkspaceSymbolRegistrationOptions } from 'vscode-languageserver-protocol';
3import { FeatureClient, WorkspaceFeature } from './features';
4export interface ProvideWorkspaceSymbolsSignature {
5 (this: void, query: string, token: CancellationToken): ProviderResult<VSymbolInformation[]>;
6}
7export interface ResolveWorkspaceSymbolSignature {
8 (this: void, item: VSymbolInformation, token: CancellationToken): ProviderResult<VSymbolInformation>;
9}
10export interface WorkspaceSymbolMiddleware {
11 provideWorkspaceSymbols?: (this: void, query: string, token: CancellationToken, next: ProvideWorkspaceSymbolsSignature) => ProviderResult<VSymbolInformation[]>;
12 resolveWorkspaceSymbol?: (this: void, item: VSymbolInformation, token: CancellationToken, next: ResolveWorkspaceSymbolSignature) => ProviderResult<VSymbolInformation>;
13}
14export declare class WorkspaceSymbolFeature extends WorkspaceFeature<WorkspaceSymbolRegistrationOptions, WorkspaceSymbolProvider, WorkspaceSymbolMiddleware> {
15 constructor(client: FeatureClient<WorkspaceSymbolMiddleware>);
16 fillClientCapabilities(capabilities: ClientCapabilities): void;
17 initialize(capabilities: ServerCapabilities): void;
18 protected registerLanguageProvider(options: WorkspaceSymbolRegistrationOptions): [Disposable, WorkspaceSymbolProvider];
19}