1 | import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
|
2 | import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
|
3 | import { MessageDirection, ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
|
4 | import type { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
|
5 |
|
6 |
|
7 |
|
8 | export interface SemanticTokensPartialResult {
|
9 | data: uinteger[];
|
10 | }
|
11 |
|
12 |
|
13 |
|
14 | export interface SemanticTokensDeltaPartialResult {
|
15 | edits: SemanticTokensEdit[];
|
16 | }
|
17 | export declare namespace TokenFormat {
|
18 | const Relative: 'relative';
|
19 | }
|
20 | export type TokenFormat = 'relative';
|
21 |
|
22 |
|
23 |
|
24 | export interface SemanticTokensClientCapabilities {
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 | dynamicRegistration?: boolean;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | requests: {
|
42 | |
43 |
|
44 |
|
45 |
|
46 | range?: boolean | {};
|
47 | |
48 |
|
49 |
|
50 |
|
51 | full?: boolean | {
|
52 | |
53 |
|
54 |
|
55 |
|
56 | delta?: boolean;
|
57 | };
|
58 | };
|
59 | |
60 |
|
61 |
|
62 | tokenTypes: string[];
|
63 | |
64 |
|
65 |
|
66 | tokenModifiers: string[];
|
67 | |
68 |
|
69 |
|
70 | formats: TokenFormat[];
|
71 | |
72 |
|
73 |
|
74 | overlappingTokenSupport?: boolean;
|
75 | |
76 |
|
77 |
|
78 | multilineTokenSupport?: boolean;
|
79 | |
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | serverCancelSupport?: boolean;
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | augmentsSyntaxTokens?: boolean;
|
101 | }
|
102 |
|
103 |
|
104 |
|
105 | export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
106 | |
107 |
|
108 |
|
109 | legend: SemanticTokensLegend;
|
110 | |
111 |
|
112 |
|
113 |
|
114 | range?: boolean | {};
|
115 | |
116 |
|
117 |
|
118 | full?: boolean | {
|
119 | |
120 |
|
121 |
|
122 | delta?: boolean;
|
123 | };
|
124 | }
|
125 |
|
126 |
|
127 |
|
128 | export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
|
129 | }
|
130 | export declare namespace SemanticTokensRegistrationType {
|
131 | const method: 'textDocument/semanticTokens';
|
132 | const type: RegistrationType<SemanticTokensRegistrationOptions>;
|
133 | }
|
134 |
|
135 |
|
136 |
|
137 | export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
|
138 | |
139 |
|
140 |
|
141 | textDocument: TextDocumentIdentifier;
|
142 | }
|
143 |
|
144 |
|
145 |
|
146 | export declare namespace SemanticTokensRequest {
|
147 | const method: 'textDocument/semanticTokens/full';
|
148 | const messageDirection: MessageDirection;
|
149 | const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
|
150 | const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
151 | type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
|
152 | }
|
153 |
|
154 |
|
155 |
|
156 | export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams {
|
157 | |
158 |
|
159 |
|
160 | textDocument: TextDocumentIdentifier;
|
161 | |
162 |
|
163 |
|
164 |
|
165 | previousResultId: string;
|
166 | }
|
167 |
|
168 |
|
169 |
|
170 | export declare namespace SemanticTokensDeltaRequest {
|
171 | const method: 'textDocument/semanticTokens/full/delta';
|
172 | const messageDirection: MessageDirection;
|
173 | const type: ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>;
|
174 | const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
175 | type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
|
176 | }
|
177 |
|
178 |
|
179 |
|
180 | export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
181 | |
182 |
|
183 |
|
184 | textDocument: TextDocumentIdentifier;
|
185 | |
186 |
|
187 |
|
188 | range: Range;
|
189 | }
|
190 |
|
191 |
|
192 |
|
193 | export declare namespace SemanticTokensRangeRequest {
|
194 | const method: 'textDocument/semanticTokens/range';
|
195 | const messageDirection: MessageDirection;
|
196 | const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
197 | const registrationMethod: typeof SemanticTokensRegistrationType.method;
|
198 | type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
|
199 | }
|
200 |
|
201 |
|
202 |
|
203 | export interface SemanticTokensWorkspaceClientCapabilities {
|
204 | |
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 | refreshSupport?: boolean;
|
214 | }
|
215 |
|
216 |
|
217 |
|
218 | export declare namespace SemanticTokensRefreshRequest {
|
219 | const method: `workspace/semanticTokens/refresh`;
|
220 | const messageDirection: MessageDirection;
|
221 | const type: ProtocolRequestType0<void, void, void, void>;
|
222 | type HandlerSignature = RequestHandler0<void, void>;
|
223 | }
|