@adecore/lsp 0.0.1 → 0.17.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +33 -0
  3. package/dist/connection.d.ts +50 -0
  4. package/dist/connection.js +290 -0
  5. package/dist/document.d.ts +60 -0
  6. package/dist/document.js +282 -0
  7. package/dist/edits.d.ts +18 -0
  8. package/dist/edits.js +161 -0
  9. package/dist/file-operations.d.ts +5 -0
  10. package/dist/file-operations.js +23 -0
  11. package/dist/glob.d.ts +1 -0
  12. package/dist/glob.js +67 -0
  13. package/dist/index.d.ts +12 -0
  14. package/dist/index.js +10 -0
  15. package/dist/protocol.d.ts +470 -0
  16. package/dist/protocol.js +1 -0
  17. package/dist/service.d.ts +53 -0
  18. package/dist/service.js +1 -0
  19. package/dist/session.d.ts +78 -0
  20. package/dist/session.js +528 -0
  21. package/dist/test-transport.d.ts +33 -0
  22. package/dist/test-transport.js +72 -0
  23. package/dist/testing.d.ts +33 -0
  24. package/dist/testing.js +72 -0
  25. package/dist/transport.d.ts +27 -0
  26. package/dist/transport.js +258 -0
  27. package/dist/uris.d.ts +2 -0
  28. package/dist/uris.js +28 -0
  29. package/dist/vue.d.ts +6 -0
  30. package/dist/vue.js +86 -0
  31. package/dist/watched-files.d.ts +3 -0
  32. package/dist/watched-files.js +41 -0
  33. package/package.json +36 -3
  34. package/src/connection.ts +310 -0
  35. package/src/document.ts +357 -0
  36. package/src/edits.ts +182 -0
  37. package/src/file-operations.ts +30 -0
  38. package/src/glob.ts +60 -0
  39. package/src/index.ts +30 -0
  40. package/src/protocol.ts +479 -0
  41. package/src/service.ts +109 -0
  42. package/src/session.ts +613 -0
  43. package/src/test-transport.ts +92 -0
  44. package/src/testing.ts +105 -0
  45. package/src/transport.ts +290 -0
  46. package/src/uris.ts +29 -0
  47. package/src/vue.ts +93 -0
  48. package/src/watched-files.ts +49 -0
@@ -0,0 +1,479 @@
1
+ export interface Disposable {
2
+ dispose(): void;
3
+ }
4
+
5
+ export type RequestId = number | string;
6
+
7
+ export interface RpcRequest {
8
+ jsonrpc: '2.0';
9
+ id: RequestId;
10
+ method: string;
11
+ params?: unknown;
12
+ }
13
+
14
+ export interface RpcNotification {
15
+ jsonrpc: '2.0';
16
+ method: string;
17
+ params?: unknown;
18
+ }
19
+
20
+ export interface RpcResponse {
21
+ jsonrpc: '2.0';
22
+ id: RequestId | null;
23
+ result?: unknown;
24
+ error?: { code: number; message: string; data?: unknown };
25
+ }
26
+
27
+ export type RpcMessage = RpcRequest | RpcNotification | RpcResponse;
28
+
29
+ /*
30
+ * What a connection speaks over. A message arrives parsed and is not validated yet, since the
31
+ * connection is the one that knows what a valid one looks like.
32
+ */
33
+ export interface LspTransport {
34
+ send(message: RpcMessage): void | Promise<void>;
35
+ onMessage(listener: (message: unknown) => void): Disposable;
36
+ onClose(listener: (error?: Error) => void): Disposable;
37
+ close(): void | Promise<void>;
38
+ }
39
+
40
+ export interface RequestOptions {
41
+ signal?: AbortSignal;
42
+ timeoutMs?: number;
43
+ }
44
+
45
+ export interface DocumentRequestOptions extends RequestOptions {
46
+ /* A newer request for the same feature of the same document cancels this one. On unless `false`. */
47
+ cancelPrevious?: boolean;
48
+ }
49
+
50
+ /* Zero-based, and a character counts UTF-16 code units. */
51
+ export interface Position {
52
+ line: number;
53
+ character: number;
54
+ }
55
+
56
+ export interface Range {
57
+ start: Position;
58
+ end: Position;
59
+ }
60
+
61
+ export interface Location {
62
+ uri: string;
63
+ range: Range;
64
+ }
65
+
66
+ export interface LocationLink {
67
+ originSelectionRange?: Range;
68
+ targetUri: string;
69
+ targetRange: Range;
70
+ targetSelectionRange: Range;
71
+ }
72
+
73
+ export type NavigationResult = Location | Location[] | LocationLink[] | null;
74
+
75
+ export interface TextEdit {
76
+ range: Range;
77
+ newText: string;
78
+ annotationId?: string;
79
+ }
80
+
81
+ /* One entry of `didChange`: a replacement of a range, or without a range the whole text. */
82
+ export interface ContentChange {
83
+ range?: Range;
84
+ text: string;
85
+ }
86
+
87
+ export interface InsertReplaceEdit {
88
+ newText: string;
89
+ insert: Range;
90
+ replace: Range;
91
+ }
92
+
93
+ export interface MarkupContent {
94
+ kind: 'plaintext' | 'markdown';
95
+ value: string;
96
+ }
97
+
98
+ export type MarkedString = string | { language: string; value: string };
99
+
100
+ export interface Command {
101
+ title: string;
102
+ command: string;
103
+ arguments?: unknown[];
104
+ }
105
+
106
+ export interface Diagnostic {
107
+ range: Range;
108
+ message: string;
109
+ severity?: 1 | 2 | 3 | 4;
110
+ code?: number | string;
111
+ codeDescription?: { href: string };
112
+ source?: string;
113
+ tags?: number[];
114
+ relatedInformation?: { location: Location; message: string }[];
115
+ data?: unknown;
116
+ }
117
+
118
+ export interface PublishDiagnosticsParams {
119
+ uri: string;
120
+ version?: number;
121
+ diagnostics: Diagnostic[];
122
+ }
123
+
124
+ export interface CompletionContext {
125
+ triggerKind: 1 | 2 | 3;
126
+ triggerCharacter?: string;
127
+ }
128
+
129
+ export interface CompletionItem {
130
+ label: string;
131
+ labelDetails?: { detail?: string; description?: string };
132
+ kind?: number;
133
+ tags?: number[];
134
+ detail?: string;
135
+ documentation?: string | MarkupContent;
136
+ deprecated?: boolean;
137
+ preselect?: boolean;
138
+ sortText?: string;
139
+ filterText?: string;
140
+ insertText?: string;
141
+ insertTextFormat?: 1 | 2;
142
+ insertTextMode?: 1 | 2;
143
+ textEdit?: TextEdit | InsertReplaceEdit;
144
+ textEditText?: string;
145
+ additionalTextEdits?: TextEdit[];
146
+ commitCharacters?: string[];
147
+ command?: Command;
148
+ data?: unknown;
149
+ [extension: string]: unknown;
150
+ }
151
+
152
+ export interface CompletionList {
153
+ isIncomplete: boolean;
154
+ items: CompletionItem[];
155
+ itemDefaults?: {
156
+ commitCharacters?: string[];
157
+ editRange?: Range | { insert: Range; replace: Range };
158
+ insertTextFormat?: 1 | 2;
159
+ insertTextMode?: 1 | 2;
160
+ data?: unknown;
161
+ };
162
+ }
163
+
164
+ export type CompletionResult = CompletionItem[] | CompletionList | null;
165
+
166
+ export interface Hover {
167
+ contents: MarkupContent | MarkedString | MarkedString[];
168
+ range?: Range;
169
+ }
170
+
171
+ export interface DocumentHighlight {
172
+ range: Range;
173
+ kind?: 1 | 2 | 3;
174
+ }
175
+
176
+ export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26;
177
+
178
+ export interface DocumentSymbol {
179
+ name: string;
180
+ detail?: string;
181
+ kind: SymbolKind;
182
+ tags?: 1[];
183
+ deprecated?: boolean;
184
+ range: Range;
185
+ selectionRange: Range;
186
+ children?: DocumentSymbol[];
187
+ }
188
+
189
+ export interface SymbolInformation {
190
+ name: string;
191
+ kind: SymbolKind;
192
+ tags?: 1[];
193
+ deprecated?: boolean;
194
+ location: Location;
195
+ containerName?: string;
196
+ }
197
+
198
+ export interface WorkspaceSymbol {
199
+ name: string;
200
+ kind: SymbolKind;
201
+ tags?: 1[];
202
+ containerName?: string;
203
+ location: Location | { uri: string };
204
+ data?: unknown;
205
+ }
206
+
207
+ export type DocumentSymbolResult = DocumentSymbol[] | SymbolInformation[] | null;
208
+ export type WorkspaceSymbolResult = SymbolInformation[] | WorkspaceSymbol[] | null;
209
+
210
+ export interface ParameterInformation {
211
+ label: string | [number, number];
212
+ documentation?: string | MarkupContent;
213
+ }
214
+
215
+ export interface SignatureInformation {
216
+ label: string;
217
+ documentation?: string | MarkupContent;
218
+ parameters?: ParameterInformation[];
219
+ activeParameter?: number;
220
+ }
221
+
222
+ export interface SignatureHelp {
223
+ signatures: SignatureInformation[];
224
+ activeSignature?: number;
225
+ activeParameter?: number;
226
+ }
227
+
228
+ export interface SignatureHelpContext {
229
+ triggerKind: 1 | 2 | 3;
230
+ triggerCharacter?: string;
231
+ isRetrigger: boolean;
232
+ activeSignatureHelp?: SignatureHelp;
233
+ }
234
+
235
+ export type PrepareRenameResult = Range | { range: Range; placeholder: string } | { defaultBehavior: boolean } | null;
236
+
237
+ export interface TextDocumentEdit {
238
+ textDocument: { uri: string; version: number | null };
239
+ edits: TextEdit[];
240
+ }
241
+
242
+ export interface CreateFile {
243
+ kind: 'create';
244
+ uri: string;
245
+ options?: { overwrite?: boolean; ignoreIfExists?: boolean };
246
+ annotationId?: string;
247
+ }
248
+
249
+ export interface RenameFile {
250
+ kind: 'rename';
251
+ oldUri: string;
252
+ newUri: string;
253
+ options?: { overwrite?: boolean; ignoreIfExists?: boolean };
254
+ annotationId?: string;
255
+ }
256
+
257
+ export interface DeleteFile {
258
+ kind: 'delete';
259
+ uri: string;
260
+ options?: { recursive?: boolean; ignoreIfNotExists?: boolean };
261
+ annotationId?: string;
262
+ }
263
+
264
+ export interface WorkspaceEdit {
265
+ changes?: Record<string, TextEdit[]>;
266
+ documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
267
+ changeAnnotations?: Record<string, { label: string; needsConfirmation?: boolean; description?: string }>;
268
+ }
269
+
270
+ /* One entry of `workspace/willRenameFiles` and `didRenameFiles`. */
271
+ export interface FileRename {
272
+ oldUri: string;
273
+ newUri: string;
274
+ }
275
+
276
+ export interface FileOperationFilter {
277
+ scheme?: string;
278
+ pattern: { glob: string; matches?: 'file' | 'folder'; options?: { ignoreCase?: boolean } };
279
+ }
280
+
281
+ export interface ApplyWorkspaceEditParams {
282
+ label?: string;
283
+ edit: WorkspaceEdit;
284
+ }
285
+
286
+ export interface ApplyWorkspaceEditResult {
287
+ applied: boolean;
288
+ failureReason?: string;
289
+ failedChange?: number;
290
+ }
291
+
292
+ export interface CodeAction {
293
+ title: string;
294
+ kind?: string;
295
+ diagnostics?: Diagnostic[];
296
+ isPreferred?: boolean;
297
+ disabled?: { reason: string };
298
+ edit?: WorkspaceEdit;
299
+ command?: Command;
300
+ data?: unknown;
301
+ [extension: string]: unknown;
302
+ }
303
+
304
+ export interface CodeActionContext {
305
+ diagnostics: Diagnostic[];
306
+ only?: string[];
307
+ triggerKind?: 1 | 2;
308
+ }
309
+
310
+ export interface FormattingOptions {
311
+ tabSize: number;
312
+ insertSpaces: boolean;
313
+ trimTrailingWhitespace?: boolean;
314
+ insertFinalNewline?: boolean;
315
+ trimFinalNewlines?: boolean;
316
+ [key: string]: boolean | number | string | undefined;
317
+ }
318
+
319
+ export interface SemanticTokens {
320
+ resultId?: string;
321
+ data: number[];
322
+ }
323
+
324
+ export interface SemanticTokensDelta {
325
+ resultId?: string;
326
+ edits: { start: number; deleteCount: number; data?: number[] }[];
327
+ }
328
+
329
+ export interface SemanticTokensLegend {
330
+ tokenTypes: string[];
331
+ tokenModifiers: string[];
332
+ }
333
+
334
+ export interface InlayHintLabelPart {
335
+ value: string;
336
+ tooltip?: string | MarkupContent;
337
+ location?: Location;
338
+ command?: Command;
339
+ }
340
+
341
+ export interface InlayHint {
342
+ position: Position;
343
+ label: string | InlayHintLabelPart[];
344
+ kind?: 1 | 2;
345
+ textEdits?: TextEdit[];
346
+ tooltip?: string | MarkupContent;
347
+ paddingLeft?: boolean;
348
+ paddingRight?: boolean;
349
+ data?: unknown;
350
+ [extension: string]: unknown;
351
+ }
352
+
353
+ export interface FoldingRange {
354
+ startLine: number;
355
+ startCharacter?: number;
356
+ endLine: number;
357
+ endCharacter?: number;
358
+ kind?: string;
359
+ collapsedText?: string;
360
+ }
361
+
362
+ /* One link of a chain that grows from the smallest range around a position to the whole document. */
363
+ export interface SelectionRange {
364
+ range: Range;
365
+ parent?: SelectionRange;
366
+ }
367
+
368
+ export interface CodeLens {
369
+ range: Range;
370
+ command?: Command;
371
+ data?: unknown;
372
+ }
373
+
374
+ export type DocumentDiagnosticReport =
375
+ | { kind: 'full'; resultId?: string; items: Diagnostic[]; relatedDocuments?: Record<string, DocumentDiagnosticReport> }
376
+ | { kind: 'unchanged'; resultId: string; relatedDocuments?: Record<string, DocumentDiagnosticReport> };
377
+
378
+ export interface DocumentFilter {
379
+ language?: string;
380
+ scheme?: string;
381
+ pattern?: string;
382
+ }
383
+
384
+ /* What a server asks to hear about: a glob relative to the project, or one relative to a folder. `kind` is a bit set of create (1), change (2) and delete (4), all three when absent. */
385
+ export interface FileSystemWatcher {
386
+ globPattern: string | { baseUri: string | WorkspaceFolder; pattern: string };
387
+ kind?: number;
388
+ }
389
+
390
+ export interface FileEvent {
391
+ uri: string;
392
+ type: 1 | 2 | 3;
393
+ }
394
+
395
+ export interface Registration {
396
+ id: string;
397
+ method: string;
398
+ registerOptions?: ProviderOptions;
399
+ }
400
+
401
+ export interface ProviderOptions {
402
+ documentSelector?: DocumentFilter[] | null;
403
+ resolveProvider?: boolean;
404
+ prepareProvider?: boolean;
405
+ triggerCharacters?: string[];
406
+ retriggerCharacters?: string[];
407
+ commands?: string[];
408
+ watchers?: FileSystemWatcher[];
409
+ codeActionKinds?: string[];
410
+ legend?: SemanticTokensLegend;
411
+ /* Of a file operation registration. */
412
+ filters?: FileOperationFilter[];
413
+ range?: boolean | object;
414
+ full?: boolean | { delta?: boolean };
415
+ [option: string]: unknown;
416
+ }
417
+
418
+ export interface TextDocumentSyncOptions {
419
+ openClose?: boolean;
420
+ change?: 0 | 1 | 2;
421
+ willSave?: boolean;
422
+ willSaveWaitUntil?: boolean;
423
+ save?: boolean | { includeText?: boolean };
424
+ }
425
+
426
+ export interface ServerCapabilities {
427
+ positionEncoding?: string;
428
+ textDocumentSync?: 0 | 1 | 2 | TextDocumentSyncOptions;
429
+ completionProvider?: ProviderOptions;
430
+ hoverProvider?: boolean | ProviderOptions;
431
+ signatureHelpProvider?: ProviderOptions;
432
+ definitionProvider?: boolean | ProviderOptions;
433
+ declarationProvider?: boolean | ProviderOptions;
434
+ typeDefinitionProvider?: boolean | ProviderOptions;
435
+ implementationProvider?: boolean | ProviderOptions;
436
+ referencesProvider?: boolean | ProviderOptions;
437
+ documentHighlightProvider?: boolean | ProviderOptions;
438
+ documentSymbolProvider?: boolean | ProviderOptions;
439
+ workspaceSymbolProvider?: boolean | ProviderOptions;
440
+ renameProvider?: boolean | ProviderOptions;
441
+ codeActionProvider?: boolean | ProviderOptions;
442
+ codeLensProvider?: ProviderOptions;
443
+ executeCommandProvider?: ProviderOptions;
444
+ documentFormattingProvider?: boolean | ProviderOptions;
445
+ documentRangeFormattingProvider?: boolean | ProviderOptions;
446
+ foldingRangeProvider?: boolean | ProviderOptions;
447
+ selectionRangeProvider?: boolean | ProviderOptions;
448
+ semanticTokensProvider?: ProviderOptions & { legend: SemanticTokensLegend };
449
+ inlayHintProvider?: boolean | ProviderOptions;
450
+ diagnosticProvider?: ProviderOptions;
451
+ [capability: string]: unknown;
452
+ }
453
+
454
+ export interface InitializeResult {
455
+ capabilities: ServerCapabilities;
456
+ serverInfo?: { name: string; version?: string };
457
+ }
458
+
459
+ export interface WorkspaceFolder {
460
+ uri: string;
461
+ name: string;
462
+ }
463
+
464
+ export interface DocumentItem {
465
+ uri: string;
466
+ languageId: string;
467
+ text: string;
468
+ version?: number;
469
+ }
470
+
471
+ export interface ConfigurationItem {
472
+ scopeUri?: string;
473
+ section?: string;
474
+ }
475
+
476
+ export interface ProgressParams {
477
+ token: string | number;
478
+ value: unknown;
479
+ }
package/src/service.ts ADDED
@@ -0,0 +1,109 @@
1
+ import type {
2
+ CodeAction,
3
+ CodeActionContext,
4
+ CodeLens,
5
+ Command,
6
+ CompletionContext,
7
+ CompletionItem,
8
+ CompletionResult,
9
+ ContentChange,
10
+ Diagnostic,
11
+ Disposable,
12
+ DocumentHighlight,
13
+ DocumentSymbolResult,
14
+ FoldingRange,
15
+ FormattingOptions,
16
+ Hover,
17
+ InlayHint,
18
+ Location,
19
+ NavigationResult,
20
+ Position,
21
+ PrepareRenameResult,
22
+ ProviderOptions,
23
+ Range,
24
+ SelectionRange,
25
+ SemanticTokens,
26
+ SemanticTokensDelta,
27
+ SignatureHelp,
28
+ SignatureHelpContext,
29
+ TextEdit,
30
+ WorkspaceEdit,
31
+ WorkspaceSymbolResult
32
+ } from './protocol.ts';
33
+
34
+ export interface LanguageDocument {
35
+ /* The `file:` URI the language servers know the file by, which `pathToFileUri` makes of a path. */
36
+ uri: string;
37
+ languageId: string;
38
+ text: string;
39
+ }
40
+
41
+ export interface LanguageRequestOptions {
42
+ signal?: AbortSignal;
43
+ /* Runs beside others of its feature, which a newer request would otherwise take over from; for a feature that asks many questions at once. */
44
+ parallel?: boolean;
45
+ }
46
+
47
+ /* What one language server reported for a document. A new report replaces the earlier one of the same `source`. */
48
+ export interface DiagnosticsReport {
49
+ uri: string;
50
+ /* Which server, since a document of a pair (Vue and TypeScript) hears from two. */
51
+ source: string;
52
+ /* The document version the report is for; absent when the server did not say. */
53
+ version?: number;
54
+ diagnostics: Diagnostic[];
55
+ }
56
+
57
+ /*
58
+ * What the editor asks of the language side. Everything is in LSP shapes, so a position is a line
59
+ * and a UTF-16 character and a range is two of them; turning those into offsets in a text is the
60
+ * caller's job. A request for a text that moved on rejects with `StaleResultError`, one for a
61
+ * feature nothing supports with an `LspError` of code -32601, and one for a server that is not up
62
+ * with an `LspError` of code -32002.
63
+ */
64
+ export interface LanguageService {
65
+ /* Opens the document, or joins it when another client already has it open; the text given then replaces what is held. */
66
+ openDocument(document: LanguageDocument): Promise<void>;
67
+ /* Applies `didChange` entries in order. Every call raises the version by one. */
68
+ changeDocument(uri: string, changes: readonly ContentChange[]): Promise<void>;
69
+ closeDocument(uri: string): Promise<void>;
70
+
71
+ /* Whether any server of the document answers `method` now, and the options it gave (trigger characters, a legend, resolve support). */
72
+ supports(method: string, uri: string): boolean;
73
+ providerOptions(method: string, uri: string): ProviderOptions | undefined;
74
+ /* What a document may ask changed: a server came up, registered a feature or asked for a refresh. Semantic tokens and hints are asked again. */
75
+ onProvidersChanged(listener: (uri: string) => void): Disposable;
76
+ onDiagnostics(listener: (report: DiagnosticsReport) => void): Disposable;
77
+
78
+ completion(uri: string, position: Position, context?: CompletionContext, options?: LanguageRequestOptions): Promise<CompletionResult>;
79
+ resolveCompletion(uri: string, item: CompletionItem, options?: LanguageRequestOptions): Promise<CompletionItem>;
80
+ hover(uri: string, position: Position, options?: LanguageRequestOptions): Promise<Hover | null>;
81
+ signatureHelp(uri: string, position: Position, context?: SignatureHelpContext, options?: LanguageRequestOptions): Promise<SignatureHelp | null>;
82
+ definition(uri: string, position: Position, options?: LanguageRequestOptions): Promise<NavigationResult>;
83
+ declaration(uri: string, position: Position, options?: LanguageRequestOptions): Promise<NavigationResult>;
84
+ typeDefinition(uri: string, position: Position, options?: LanguageRequestOptions): Promise<NavigationResult>;
85
+ implementation(uri: string, position: Position, options?: LanguageRequestOptions): Promise<NavigationResult>;
86
+ references(uri: string, position: Position, includeDeclaration?: boolean, options?: LanguageRequestOptions): Promise<Location[] | null>;
87
+ documentHighlights(uri: string, position: Position, options?: LanguageRequestOptions): Promise<DocumentHighlight[] | null>;
88
+ documentSymbols(uri: string, options?: LanguageRequestOptions): Promise<DocumentSymbolResult>;
89
+ prepareRename(uri: string, position: Position, options?: LanguageRequestOptions): Promise<PrepareRenameResult>;
90
+ rename(uri: string, position: Position, newName: string, options?: LanguageRequestOptions): Promise<WorkspaceEdit | null>;
91
+ codeActions(uri: string, range: Range, context?: CodeActionContext, options?: LanguageRequestOptions): Promise<(CodeAction | Command)[] | null>;
92
+ resolveCodeAction(uri: string, action: CodeAction, options?: LanguageRequestOptions): Promise<CodeAction>;
93
+ /* Runs a command of a code action on the server that offered it. The server may ask for edits while it runs, which the host applies. */
94
+ executeCommand(uri: string, command: Command, options?: LanguageRequestOptions): Promise<unknown>;
95
+ formatting(uri: string, formatting: FormattingOptions, options?: LanguageRequestOptions): Promise<TextEdit[] | null>;
96
+ rangeFormatting(uri: string, range: Range, formatting: FormattingOptions, options?: LanguageRequestOptions): Promise<TextEdit[] | null>;
97
+ semanticTokens(uri: string, options?: LanguageRequestOptions): Promise<SemanticTokens | null>;
98
+ semanticTokensDelta(uri: string, previousResultId: string, options?: LanguageRequestOptions): Promise<SemanticTokens | SemanticTokensDelta | null>;
99
+ semanticTokensRange(uri: string, range: Range, options?: LanguageRequestOptions): Promise<SemanticTokens | null>;
100
+ inlayHints(uri: string, range: Range, options?: LanguageRequestOptions): Promise<InlayHint[] | null>;
101
+ resolveInlayHint(uri: string, hint: InlayHint, options?: LanguageRequestOptions): Promise<InlayHint>;
102
+ /* The symbols of the whole project that answer to a query, asked of the server that serves the document. */
103
+ workspaceSymbols(uri: string, query: string, options?: LanguageRequestOptions): Promise<WorkspaceSymbolResult>;
104
+ foldingRanges(uri: string, options?: LanguageRequestOptions): Promise<FoldingRange[] | null>;
105
+ /* One chain per position, the smallest range first, each in its `parent`. */
106
+ selectionRanges(uri: string, positions: readonly Position[], options?: LanguageRequestOptions): Promise<SelectionRange[] | null>;
107
+ codeLenses(uri: string, options?: LanguageRequestOptions): Promise<CodeLens[] | null>;
108
+ resolveCodeLens(uri: string, lens: CodeLens, options?: LanguageRequestOptions): Promise<CodeLens>;
109
+ }