@volar/language-server 1.0.19 → 1.0.20
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.
- package/out/browser/index.d.ts +3 -1
- package/out/browser/index.js +8 -4
- package/out/common/features/customFeatures.js +16 -16
- package/out/common/features/languageFeatures.js +45 -0
- package/out/common/project.d.ts +25 -5
- package/out/common/project.js +61 -39
- package/out/common/server.d.ts +1 -1
- package/out/common/server.js +13 -36
- package/out/common/utils/inferredCompilerOptions.d.ts +1 -1
- package/out/common/utils/inferredCompilerOptions.js +5 -5
- package/out/common/utils/registerFeatures.d.ts +1 -2
- package/out/common/utils/registerFeatures.js +68 -51
- package/out/common/workspace.d.ts +218 -38
- package/out/common/workspace.js +18 -14
- package/out/common/workspaces.d.ts +269 -49
- package/out/common/workspaces.js +12 -9
- package/out/node/index.d.ts +3 -1
- package/out/node/index.js +8 -5
- package/out/types.d.ts +7 -13
- package/package.json +5 -5
- package/out/common/features/documentFeatures.d.ts +0 -4
- package/out/common/features/documentFeatures.js +0 -73
- package/out/common/syntaxServicesHost.d.ts +0 -29
- package/out/common/syntaxServicesHost.js +0 -53
|
@@ -57,6 +57,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
57
57
|
};
|
|
58
58
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
59
59
|
getLanguageService: () => {
|
|
60
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
61
|
+
ch: string;
|
|
62
|
+
position: vscode.Position;
|
|
63
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
64
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
65
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
66
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
67
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
68
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
69
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
60
70
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
61
71
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
62
72
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -93,10 +103,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
93
103
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
94
104
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
95
105
|
};
|
|
96
|
-
dispose: () => void;
|
|
97
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
106
|
+
dispose: () => void | undefined;
|
|
107
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
98
108
|
};
|
|
99
109
|
getLanguageServiceDontCreate: () => {
|
|
110
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
111
|
+
ch: string;
|
|
112
|
+
position: vscode.Position;
|
|
113
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
114
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
115
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
116
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
117
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
118
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
119
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
100
120
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
101
121
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
102
122
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -133,8 +153,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
133
153
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
134
154
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
135
155
|
};
|
|
136
|
-
dispose: () => void;
|
|
137
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
156
|
+
dispose: () => void | undefined;
|
|
157
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
138
158
|
} | undefined;
|
|
139
159
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
140
160
|
tryAddFile: (fileName: string) => void;
|
|
@@ -187,6 +207,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
187
207
|
};
|
|
188
208
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
189
209
|
getLanguageService: () => {
|
|
210
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
211
|
+
ch: string;
|
|
212
|
+
position: vscode.Position;
|
|
213
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
214
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
215
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
216
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
217
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
218
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
219
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
190
220
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
191
221
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
192
222
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -223,10 +253,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
223
253
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
224
254
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
225
255
|
};
|
|
226
|
-
dispose: () => void;
|
|
227
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
256
|
+
dispose: () => void | undefined;
|
|
257
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
228
258
|
};
|
|
229
259
|
getLanguageServiceDontCreate: () => {
|
|
260
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
261
|
+
ch: string;
|
|
262
|
+
position: vscode.Position;
|
|
263
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
264
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
265
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
266
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
267
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
268
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
269
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
230
270
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
231
271
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
232
272
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -263,8 +303,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
263
303
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
264
304
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
265
305
|
};
|
|
266
|
-
dispose: () => void;
|
|
267
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
306
|
+
dispose: () => void | undefined;
|
|
307
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
268
308
|
} | undefined;
|
|
269
309
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
270
310
|
tryAddFile: (fileName: string) => void;
|
|
@@ -317,6 +357,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
317
357
|
};
|
|
318
358
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
319
359
|
getLanguageService: () => {
|
|
360
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
361
|
+
ch: string;
|
|
362
|
+
position: vscode.Position;
|
|
363
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
364
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
365
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
366
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
367
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
368
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
369
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
320
370
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
321
371
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
322
372
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -353,10 +403,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
353
403
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
354
404
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
355
405
|
};
|
|
356
|
-
dispose: () => void;
|
|
357
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
406
|
+
dispose: () => void | undefined;
|
|
407
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
358
408
|
};
|
|
359
409
|
getLanguageServiceDontCreate: () => {
|
|
410
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
411
|
+
ch: string;
|
|
412
|
+
position: vscode.Position;
|
|
413
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
414
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
415
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
416
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
417
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
418
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
419
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
360
420
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
361
421
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
362
422
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -393,8 +453,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
393
453
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
394
454
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
395
455
|
};
|
|
396
|
-
dispose: () => void;
|
|
397
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
456
|
+
dispose: () => void | undefined;
|
|
457
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
398
458
|
} | undefined;
|
|
399
459
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
400
460
|
tryAddFile: (fileName: string) => void;
|
|
@@ -447,6 +507,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
447
507
|
};
|
|
448
508
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
449
509
|
getLanguageService: () => {
|
|
510
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
511
|
+
ch: string;
|
|
512
|
+
position: vscode.Position;
|
|
513
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
514
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
515
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
516
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
517
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
518
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
519
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
450
520
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
451
521
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
452
522
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -483,10 +553,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
483
553
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
484
554
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
485
555
|
};
|
|
486
|
-
dispose: () => void;
|
|
487
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
556
|
+
dispose: () => void | undefined;
|
|
557
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
488
558
|
};
|
|
489
559
|
getLanguageServiceDontCreate: () => {
|
|
560
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
561
|
+
ch: string;
|
|
562
|
+
position: vscode.Position;
|
|
563
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
564
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
565
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
566
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
567
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
568
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
569
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
490
570
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
491
571
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
492
572
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -523,8 +603,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
523
603
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
524
604
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
525
605
|
};
|
|
526
|
-
dispose: () => void;
|
|
527
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
606
|
+
dispose: () => void | undefined;
|
|
607
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
528
608
|
} | undefined;
|
|
529
609
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
530
610
|
tryAddFile: (fileName: string) => void;
|
|
@@ -576,6 +656,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
576
656
|
};
|
|
577
657
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
578
658
|
getLanguageService: () => {
|
|
659
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
660
|
+
ch: string;
|
|
661
|
+
position: vscode.Position;
|
|
662
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
663
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
664
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
665
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
666
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
667
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
668
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
579
669
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
580
670
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
581
671
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -612,10 +702,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
612
702
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
613
703
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
614
704
|
};
|
|
615
|
-
dispose: () => void;
|
|
616
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
705
|
+
dispose: () => void | undefined;
|
|
706
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
617
707
|
};
|
|
618
708
|
getLanguageServiceDontCreate: () => {
|
|
709
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
710
|
+
ch: string;
|
|
711
|
+
position: vscode.Position;
|
|
712
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
713
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
714
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
715
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
716
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
717
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
718
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
619
719
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
620
720
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
621
721
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -652,8 +752,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
652
752
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
653
753
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
654
754
|
};
|
|
655
|
-
dispose: () => void;
|
|
656
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
755
|
+
dispose: () => void | undefined;
|
|
756
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
657
757
|
} | undefined;
|
|
658
758
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
659
759
|
tryAddFile: (fileName: string) => void;
|
|
@@ -705,6 +805,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
705
805
|
};
|
|
706
806
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
707
807
|
getLanguageService: () => {
|
|
808
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
809
|
+
ch: string;
|
|
810
|
+
position: vscode.Position;
|
|
811
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
812
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
813
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
814
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
815
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
816
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
817
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
708
818
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
709
819
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
710
820
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -741,10 +851,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
741
851
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
742
852
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
743
853
|
};
|
|
744
|
-
dispose: () => void;
|
|
745
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
854
|
+
dispose: () => void | undefined;
|
|
855
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
746
856
|
};
|
|
747
857
|
getLanguageServiceDontCreate: () => {
|
|
858
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
859
|
+
ch: string;
|
|
860
|
+
position: vscode.Position;
|
|
861
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
862
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
863
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
864
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
865
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
866
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
867
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
748
868
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
749
869
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
750
870
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -781,15 +901,15 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
781
901
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
782
902
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
783
903
|
};
|
|
784
|
-
dispose: () => void;
|
|
785
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
904
|
+
dispose: () => void | undefined;
|
|
905
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
786
906
|
} | undefined;
|
|
787
907
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
788
908
|
tryAddFile: (fileName: string) => void;
|
|
789
909
|
dispose: () => void;
|
|
790
910
|
}>) => void;
|
|
791
911
|
};
|
|
792
|
-
documentRegistry: ts.DocumentRegistry;
|
|
912
|
+
documentRegistry: ts.DocumentRegistry | undefined;
|
|
793
913
|
getProjectAndTsConfig: (uri: string) => Promise<{
|
|
794
914
|
tsconfig: string;
|
|
795
915
|
project: {
|
|
@@ -838,6 +958,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
838
958
|
};
|
|
839
959
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
840
960
|
getLanguageService: () => {
|
|
961
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
962
|
+
ch: string;
|
|
963
|
+
position: vscode.Position;
|
|
964
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
965
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
966
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
967
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
968
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
969
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
970
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
841
971
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
842
972
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
843
973
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -874,10 +1004,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
874
1004
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
875
1005
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
876
1006
|
};
|
|
877
|
-
dispose: () => void;
|
|
878
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1007
|
+
dispose: () => void | undefined;
|
|
1008
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
879
1009
|
};
|
|
880
1010
|
getLanguageServiceDontCreate: () => {
|
|
1011
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
1012
|
+
ch: string;
|
|
1013
|
+
position: vscode.Position;
|
|
1014
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
1015
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
1016
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
1017
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
1018
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
1019
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
1020
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
881
1021
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
882
1022
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
883
1023
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -914,13 +1054,13 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
914
1054
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
915
1055
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
916
1056
|
};
|
|
917
|
-
dispose: () => void;
|
|
918
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1057
|
+
dispose: () => void | undefined;
|
|
1058
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
919
1059
|
} | undefined;
|
|
920
1060
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
921
1061
|
tryAddFile: (fileName: string) => void;
|
|
922
1062
|
dispose: () => void;
|
|
923
|
-
};
|
|
1063
|
+
} | undefined;
|
|
924
1064
|
} | undefined>;
|
|
925
1065
|
getInferredProject: () => Promise<{
|
|
926
1066
|
tsConfig: ts.CompilerOptions | path.PosixPath;
|
|
@@ -968,6 +1108,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
968
1108
|
};
|
|
969
1109
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
970
1110
|
getLanguageService: () => {
|
|
1111
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
1112
|
+
ch: string;
|
|
1113
|
+
position: vscode.Position;
|
|
1114
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
1115
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
1116
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
1117
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
1118
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
1119
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
1120
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
971
1121
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
972
1122
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
973
1123
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -1004,10 +1154,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1004
1154
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
1005
1155
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1006
1156
|
};
|
|
1007
|
-
dispose: () => void;
|
|
1008
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1157
|
+
dispose: () => void | undefined;
|
|
1158
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
1009
1159
|
};
|
|
1010
1160
|
getLanguageServiceDontCreate: () => {
|
|
1161
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
1162
|
+
ch: string;
|
|
1163
|
+
position: vscode.Position;
|
|
1164
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
1165
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
1166
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
1167
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
1168
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
1169
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
1170
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
1011
1171
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
1012
1172
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
1013
1173
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -1044,8 +1204,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1044
1204
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
1045
1205
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1046
1206
|
};
|
|
1047
|
-
dispose: () => void;
|
|
1048
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1207
|
+
dispose: () => void | undefined;
|
|
1208
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
1049
1209
|
} | undefined;
|
|
1050
1210
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1051
1211
|
tryAddFile: (fileName: string) => void;
|
|
@@ -1097,6 +1257,16 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1097
1257
|
};
|
|
1098
1258
|
languageServiceHost: import("@volar/language-core").LanguageServiceHost;
|
|
1099
1259
|
getLanguageService: () => {
|
|
1260
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
1261
|
+
ch: string;
|
|
1262
|
+
position: vscode.Position;
|
|
1263
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
1264
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
1265
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
1266
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
1267
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
1268
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
1269
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
1100
1270
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
1101
1271
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
1102
1272
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -1133,10 +1303,20 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1133
1303
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
1134
1304
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1135
1305
|
};
|
|
1136
|
-
dispose: () => void;
|
|
1137
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1306
|
+
dispose: () => void | undefined;
|
|
1307
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
1138
1308
|
};
|
|
1139
1309
|
getLanguageServiceDontCreate: () => {
|
|
1310
|
+
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
1311
|
+
ch: string;
|
|
1312
|
+
position: vscode.Position;
|
|
1313
|
+
} | undefined) => Promise<vscode.TextEdit[] | undefined>;
|
|
1314
|
+
getFoldingRanges: (uri: string) => Promise<vscode.FoldingRange[] | undefined>;
|
|
1315
|
+
getSelectionRanges: (uri: string, positions: vscode.Position[]) => Promise<vscode.SelectionRange[] | undefined>;
|
|
1316
|
+
findLinkedEditingRanges: (uri: string, position: vscode.Position) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
1317
|
+
findDocumentSymbols: (uri: string) => Promise<vscode.SymbolInformation[] | undefined>;
|
|
1318
|
+
findDocumentColors: (uri: string) => Promise<vscode.ColorInformation[] | undefined>;
|
|
1319
|
+
getColorPresentations: (uri: string, color: vscode.Color, range: vscode.Range) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
1140
1320
|
doValidation: (uri: string, token?: vscode.CancellationToken | undefined, response?: ((result: vscode.Diagnostic[]) => void) | undefined) => Promise<vscode.Diagnostic[]>;
|
|
1141
1321
|
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
1142
1322
|
findFileReferences: (uri: string) => import("@volar/language-service").NullableResult<vscode.Location[]>;
|
|
@@ -1173,8 +1353,8 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1173
1353
|
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
1174
1354
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1175
1355
|
};
|
|
1176
|
-
dispose: () => void;
|
|
1177
|
-
context: import("@volar/language-service").LanguageServiceRuntimeContext
|
|
1356
|
+
dispose: () => void | undefined;
|
|
1357
|
+
context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
|
|
1178
1358
|
} | undefined;
|
|
1179
1359
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1180
1360
|
tryAddFile: (fileName: string) => void;
|
package/out/common/workspace.js
CHANGED
|
@@ -19,14 +19,15 @@ const serverConfig_1 = require("./utils/serverConfig");
|
|
|
19
19
|
const uriMap_1 = require("./utils/uriMap");
|
|
20
20
|
exports.rootTsConfigNames = ['tsconfig.json', 'jsconfig.json'];
|
|
21
21
|
function createWorkspace(context) {
|
|
22
|
+
var _a, _b, _c;
|
|
22
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
24
|
let inferredProject;
|
|
24
25
|
const serverConfig = (0, serverConfig_1.loadServerConfig)(shared.getPathOfUri(context.rootUri.toString()), context.workspaces.initOptions.configFilePath);
|
|
25
|
-
const sys = context.workspaces.fileSystemHost.getWorkspaceFileSystem(context.rootUri);
|
|
26
|
-
const documentRegistry = context.workspaces.ts.createDocumentRegistry(sys.useCaseSensitiveFileNames, shared.getPathOfUri(context.rootUri.toString()));
|
|
26
|
+
const sys = (_a = context.workspaces.fileSystemHost) === null || _a === void 0 ? void 0 : _a.getWorkspaceFileSystem(context.rootUri);
|
|
27
|
+
const documentRegistry = sys ? (_b = context.workspaces.ts) === null || _b === void 0 ? void 0 : _b.createDocumentRegistry(sys.useCaseSensitiveFileNames, shared.getPathOfUri(context.rootUri.toString())) : undefined;
|
|
27
28
|
const projects = (0, uriMap_1.createUriMap)();
|
|
28
|
-
const rootTsConfigs = new Set(sys.readDirectory(shared.getPathOfUri(context.rootUri.toString()), exports.rootTsConfigNames, undefined, ['**/*']).map(fileName => shared.normalizeFileName(fileName)));
|
|
29
|
-
const disposeTsConfigWatch = context.workspaces.fileSystemHost.onDidChangeWatchedFiles(({ changes }) => {
|
|
29
|
+
const rootTsConfigs = new Set(sys === null || sys === void 0 ? void 0 : sys.readDirectory(shared.getPathOfUri(context.rootUri.toString()), exports.rootTsConfigNames, undefined, ['**/*']).map(fileName => shared.normalizeFileName(fileName)));
|
|
30
|
+
const disposeTsConfigWatch = (_c = context.workspaces.fileSystemHost) === null || _c === void 0 ? void 0 : _c.onDidChangeWatchedFiles(({ changes }) => {
|
|
30
31
|
for (const change of changes) {
|
|
31
32
|
if (exports.rootTsConfigNames.includes(change.uri.substring(change.uri.lastIndexOf('/') + 1))) {
|
|
32
33
|
if (change.type === vscode.FileChangeType.Created) {
|
|
@@ -54,7 +55,7 @@ function createWorkspace(context) {
|
|
|
54
55
|
reload: clearProjects,
|
|
55
56
|
dispose() {
|
|
56
57
|
clearProjects();
|
|
57
|
-
disposeTsConfigWatch();
|
|
58
|
+
disposeTsConfigWatch === null || disposeTsConfigWatch === void 0 ? void 0 : disposeTsConfigWatch();
|
|
58
59
|
},
|
|
59
60
|
};
|
|
60
61
|
function clearProjects() {
|
|
@@ -84,7 +85,7 @@ function createWorkspace(context) {
|
|
|
84
85
|
function getInferredProject() {
|
|
85
86
|
if (!inferredProject) {
|
|
86
87
|
inferredProject = (() => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
const inferOptions = yield (0, inferredCompilerOptions_1.getInferredCompilerOptions)(context.workspaces.
|
|
88
|
+
const inferOptions = yield (0, inferredCompilerOptions_1.getInferredCompilerOptions)(context.workspaces.configurationHost);
|
|
88
89
|
return (0, project_1.createProject)({
|
|
89
90
|
workspace: context,
|
|
90
91
|
rootUri: context.rootUri,
|
|
@@ -117,9 +118,10 @@ function createWorkspace(context) {
|
|
|
117
118
|
}
|
|
118
119
|
function findDirectIncludeTsconfig() {
|
|
119
120
|
return findTsconfig((tsconfig) => __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
var _a;
|
|
120
122
|
const map = (0, uriMap_1.createUriMap)();
|
|
121
123
|
const parsedCommandLine = yield getParsedCommandLine(tsconfig);
|
|
122
|
-
for (const fileName of parsedCommandLine.fileNames) {
|
|
124
|
+
for (const fileName of (_a = parsedCommandLine === null || parsedCommandLine === void 0 ? void 0 : parsedCommandLine.fileNames) !== null && _a !== void 0 ? _a : []) {
|
|
123
125
|
map.pathSet(fileName, true);
|
|
124
126
|
}
|
|
125
127
|
return map.uriHas(uri.toString());
|
|
@@ -127,10 +129,10 @@ function createWorkspace(context) {
|
|
|
127
129
|
}
|
|
128
130
|
function findIndirectReferenceTsconfig() {
|
|
129
131
|
return findTsconfig((tsconfig) => __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
var _a;
|
|
132
|
+
var _a, _b;
|
|
131
133
|
const project = yield projects.pathGet(tsconfig);
|
|
132
134
|
const ls = project === null || project === void 0 ? void 0 : project.getLanguageServiceDontCreate();
|
|
133
|
-
const validDoc = (_a = ls === null || ls === void 0 ? void 0 : ls.context.
|
|
135
|
+
const validDoc = (_b = (_a = ls === null || ls === void 0 ? void 0 : ls.context.typescript) === null || _a === void 0 ? void 0 : _a.languageService.getProgram()) === null || _b === void 0 ? void 0 : _b.getSourceFile(shared.getPathOfUri(uri.toString()));
|
|
134
136
|
return !!validDoc;
|
|
135
137
|
}));
|
|
136
138
|
}
|
|
@@ -167,7 +169,7 @@ function createWorkspace(context) {
|
|
|
167
169
|
for (const projectReference of parsedCommandLine.projectReferences) {
|
|
168
170
|
let tsConfigPath = projectReference.path;
|
|
169
171
|
// fix https://github.com/johnsoncodehk/volar/issues/712
|
|
170
|
-
if (!sys.fileExists(tsConfigPath)) {
|
|
172
|
+
if (sys && !sys.fileExists(tsConfigPath)) {
|
|
171
173
|
const newTsConfigPath = path.join(tsConfigPath, 'tsconfig.json');
|
|
172
174
|
const newJsConfigPath = path.join(tsConfigPath, 'jsconfig.json');
|
|
173
175
|
if (sys.fileExists(newTsConfigPath)) {
|
|
@@ -183,8 +185,10 @@ function createWorkspace(context) {
|
|
|
183
185
|
}
|
|
184
186
|
else {
|
|
185
187
|
const referenceParsedCommandLine = yield getParsedCommandLine(tsConfigPath);
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
if (referenceParsedCommandLine) {
|
|
189
|
+
for (const chain of yield getReferencesChains(referenceParsedCommandLine, tsConfigPath, [...before, tsConfig])) {
|
|
190
|
+
newChains.push(chain);
|
|
191
|
+
}
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
194
|
}
|
|
@@ -198,7 +202,7 @@ function createWorkspace(context) {
|
|
|
198
202
|
function getParsedCommandLine(tsConfig) {
|
|
199
203
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
204
|
const project = yield getProjectByCreate(tsConfig);
|
|
201
|
-
return project.getParsedCommandLine();
|
|
205
|
+
return project === null || project === void 0 ? void 0 : project.getParsedCommandLine();
|
|
202
206
|
});
|
|
203
207
|
}
|
|
204
208
|
});
|
|
@@ -206,7 +210,7 @@ function createWorkspace(context) {
|
|
|
206
210
|
function getProjectByCreate(_tsConfig) {
|
|
207
211
|
const tsConfig = shared.normalizeFileName(_tsConfig);
|
|
208
212
|
let project = projects.pathGet(tsConfig);
|
|
209
|
-
if (!project) {
|
|
213
|
+
if (!project && documentRegistry) {
|
|
210
214
|
project = (0, project_1.createProject)({
|
|
211
215
|
workspace: context,
|
|
212
216
|
serverConfig,
|