UNPKG

1.35 kBTypeScriptView Raw
1import * as code from 'vscode';
2import * as proto from 'vscode-languageserver-protocol';
3import { TextDocumentLanguageFeature, FeatureClient } from './features';
4export interface ProvideLinkedEditingRangeSignature {
5 (this: void, document: code.TextDocument, position: code.Position, token: code.CancellationToken): code.ProviderResult<code.LinkedEditingRanges>;
6}
7/**
8 * Linked editing middleware
9 *
10 * @since 3.16.0
11 */
12export interface LinkedEditingRangeMiddleware {
13 provideLinkedEditingRange?: (this: void, document: code.TextDocument, position: code.Position, token: code.CancellationToken, next: ProvideLinkedEditingRangeSignature) => code.ProviderResult<code.LinkedEditingRanges>;
14}
15export declare class LinkedEditingFeature extends TextDocumentLanguageFeature<boolean | proto.LinkedEditingRangeOptions, proto.LinkedEditingRangeRegistrationOptions, code.LinkedEditingRangeProvider, LinkedEditingRangeMiddleware> {
16 constructor(client: FeatureClient<LinkedEditingRangeMiddleware>);
17 fillClientCapabilities(capabilities: proto.ClientCapabilities): void;
18 initialize(capabilities: proto.ServerCapabilities, documentSelector: proto.DocumentSelector): void;
19 protected registerLanguageProvider(options: proto.LinkedEditingRangeRegistrationOptions): [code.Disposable, code.LinkedEditingRangeProvider];
20 private registerProvider;
21}