1 | import { SemanticTokens, SemanticTokensPartialResult, SemanticTokensDelta, SemanticTokensDeltaPartialResult, SemanticTokensParams, SemanticTokensDeltaParams, SemanticTokensRangeParams, SemanticTokensEdit, Disposable } from 'vscode-languageserver-protocol';
|
2 | import type { Feature, _Languages, ServerRequestHandler } from './server';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export interface SemanticTokensFeatureShape {
|
9 | semanticTokens: {
|
10 | refresh(): void;
|
11 | on(handler: ServerRequestHandler<SemanticTokensParams, SemanticTokens, SemanticTokensPartialResult, void>): Disposable;
|
12 | onDelta(handler: ServerRequestHandler<SemanticTokensDeltaParams, SemanticTokensDelta | SemanticTokens, SemanticTokensDeltaPartialResult | SemanticTokensPartialResult, void>): Disposable;
|
13 | onRange(handler: ServerRequestHandler<SemanticTokensRangeParams, SemanticTokens, SemanticTokensPartialResult, void>): Disposable;
|
14 | };
|
15 | }
|
16 | export declare const SemanticTokensFeature: Feature<_Languages, SemanticTokensFeatureShape>;
|
17 | export declare class SemanticTokensDiff {
|
18 | private readonly originalSequence;
|
19 | private readonly modifiedSequence;
|
20 | constructor(originalSequence: number[], modifiedSequence: number[]);
|
21 | computeDiff(): SemanticTokensEdit[];
|
22 | }
|
23 | export declare class SemanticTokensBuilder {
|
24 | private _id;
|
25 | private _prevLine;
|
26 | private _prevChar;
|
27 | private _data;
|
28 | private _dataLen;
|
29 | private _prevData;
|
30 | constructor();
|
31 | private initialize;
|
32 | push(line: number, char: number, length: number, tokenType: number, tokenModifiers: number): void;
|
33 | get id(): string;
|
34 | previousResult(id: string): void;
|
35 | build(): SemanticTokens;
|
36 | canBuildEdits(): boolean;
|
37 | buildEdits(): SemanticTokens | SemanticTokensDelta;
|
38 | }
|