@volar/language-server 1.1.0-alpha.2 → 1.2.0-alpha.10
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/common/features/customFeatures.js +1 -1
- package/out/common/features/languageFeatures.js +78 -81
- package/out/common/project.d.ts +5 -7
- package/out/common/project.js +30 -35
- package/out/common/utils/registerFeatures.js +9 -9
- package/out/common/utils/serverConfig.d.ts +2 -5
- package/out/common/utils/serverConfig.js +3 -3
- package/out/common/workspace.d.ts +27 -45
- package/out/common/workspace.js +1 -1
- package/out/common/workspaces.d.ts +34 -56
- package/out/common/workspaces.js +2 -11
- package/out/types.d.ts +10 -5
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="typesafe-path" />
|
|
1
|
+
/// <reference types="node_modules/.pnpm/typesafe-path@0.2.2/node_modules/typesafe-path" />
|
|
2
2
|
import { ConfigurationHost } from '@volar/language-service';
|
|
3
3
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
4
4
|
import * as vscode from 'vscode-languageserver';
|
|
@@ -26,7 +26,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
26
26
|
projects: {
|
|
27
27
|
clear: () => void;
|
|
28
28
|
values: () => IterableIterator<Promise<{
|
|
29
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
29
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
30
30
|
scripts: {
|
|
31
31
|
clear: () => void;
|
|
32
32
|
values: () => IterableIterator<{
|
|
@@ -110,7 +110,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
110
110
|
text: string;
|
|
111
111
|
};
|
|
112
112
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
113
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
114
113
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
115
114
|
callHierarchy: {
|
|
116
115
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -118,7 +117,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
118
117
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
119
118
|
};
|
|
120
119
|
dispose: () => void | undefined;
|
|
121
|
-
context: import("@volar/language-service").
|
|
120
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
122
121
|
};
|
|
123
122
|
getLanguageServiceDontCreate: () => {
|
|
124
123
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -160,7 +159,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
160
159
|
text: string;
|
|
161
160
|
};
|
|
162
161
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
163
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
164
162
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
165
163
|
callHierarchy: {
|
|
166
164
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -168,7 +166,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
168
166
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
169
167
|
};
|
|
170
168
|
dispose: () => void | undefined;
|
|
171
|
-
context: import("@volar/language-service").
|
|
169
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
172
170
|
} | undefined;
|
|
173
171
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
174
172
|
tryAddFile: (fileName: string) => void;
|
|
@@ -176,7 +174,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
176
174
|
}>>;
|
|
177
175
|
uriDelete: (_uri: string) => boolean;
|
|
178
176
|
uriGet: (_uri: string) => Promise<{
|
|
179
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
177
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
180
178
|
scripts: {
|
|
181
179
|
clear: () => void;
|
|
182
180
|
values: () => IterableIterator<{
|
|
@@ -260,7 +258,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
260
258
|
text: string;
|
|
261
259
|
};
|
|
262
260
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
263
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
264
261
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
265
262
|
callHierarchy: {
|
|
266
263
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -268,7 +265,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
268
265
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
269
266
|
};
|
|
270
267
|
dispose: () => void | undefined;
|
|
271
|
-
context: import("@volar/language-service").
|
|
268
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
272
269
|
};
|
|
273
270
|
getLanguageServiceDontCreate: () => {
|
|
274
271
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -310,7 +307,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
310
307
|
text: string;
|
|
311
308
|
};
|
|
312
309
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
313
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
314
310
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
315
311
|
callHierarchy: {
|
|
316
312
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -318,7 +314,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
318
314
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
319
315
|
};
|
|
320
316
|
dispose: () => void | undefined;
|
|
321
|
-
context: import("@volar/language-service").
|
|
317
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
322
318
|
} | undefined;
|
|
323
319
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
324
320
|
tryAddFile: (fileName: string) => void;
|
|
@@ -326,7 +322,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
326
322
|
}> | undefined;
|
|
327
323
|
uriHas: (_uri: string) => boolean;
|
|
328
324
|
uriSet: (_uri: string, item: Promise<{
|
|
329
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
325
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
330
326
|
scripts: {
|
|
331
327
|
clear: () => void;
|
|
332
328
|
values: () => IterableIterator<{
|
|
@@ -410,7 +406,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
410
406
|
text: string;
|
|
411
407
|
};
|
|
412
408
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
413
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
414
409
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
415
410
|
callHierarchy: {
|
|
416
411
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -418,7 +413,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
418
413
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
419
414
|
};
|
|
420
415
|
dispose: () => void | undefined;
|
|
421
|
-
context: import("@volar/language-service").
|
|
416
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
422
417
|
};
|
|
423
418
|
getLanguageServiceDontCreate: () => {
|
|
424
419
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -460,7 +455,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
460
455
|
text: string;
|
|
461
456
|
};
|
|
462
457
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
463
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
464
458
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
465
459
|
callHierarchy: {
|
|
466
460
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -468,7 +462,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
468
462
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
469
463
|
};
|
|
470
464
|
dispose: () => void | undefined;
|
|
471
|
-
context: import("@volar/language-service").
|
|
465
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
472
466
|
} | undefined;
|
|
473
467
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
474
468
|
tryAddFile: (fileName: string) => void;
|
|
@@ -476,7 +470,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
476
470
|
}>) => void;
|
|
477
471
|
pathDelete: (path: string) => boolean;
|
|
478
472
|
pathGet: (path: string) => Promise<{
|
|
479
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
473
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
480
474
|
scripts: {
|
|
481
475
|
clear: () => void;
|
|
482
476
|
values: () => IterableIterator<{
|
|
@@ -560,7 +554,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
560
554
|
text: string;
|
|
561
555
|
};
|
|
562
556
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
563
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
564
557
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
565
558
|
callHierarchy: {
|
|
566
559
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -568,7 +561,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
568
561
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
569
562
|
};
|
|
570
563
|
dispose: () => void | undefined;
|
|
571
|
-
context: import("@volar/language-service").
|
|
564
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
572
565
|
};
|
|
573
566
|
getLanguageServiceDontCreate: () => {
|
|
574
567
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -610,7 +603,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
610
603
|
text: string;
|
|
611
604
|
};
|
|
612
605
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
613
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
614
606
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
615
607
|
callHierarchy: {
|
|
616
608
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -618,14 +610,14 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
618
610
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
619
611
|
};
|
|
620
612
|
dispose: () => void | undefined;
|
|
621
|
-
context: import("@volar/language-service").
|
|
613
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
622
614
|
} | undefined;
|
|
623
615
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
624
616
|
tryAddFile: (fileName: string) => void;
|
|
625
617
|
dispose: () => void;
|
|
626
618
|
}> | undefined;
|
|
627
619
|
pathHas: (path: string) => Promise<{
|
|
628
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
620
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
629
621
|
scripts: {
|
|
630
622
|
clear: () => void;
|
|
631
623
|
values: () => IterableIterator<{
|
|
@@ -709,7 +701,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
709
701
|
text: string;
|
|
710
702
|
};
|
|
711
703
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
712
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
713
704
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
714
705
|
callHierarchy: {
|
|
715
706
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -717,7 +708,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
717
708
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
718
709
|
};
|
|
719
710
|
dispose: () => void | undefined;
|
|
720
|
-
context: import("@volar/language-service").
|
|
711
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
721
712
|
};
|
|
722
713
|
getLanguageServiceDontCreate: () => {
|
|
723
714
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -759,7 +750,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
759
750
|
text: string;
|
|
760
751
|
};
|
|
761
752
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
762
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
763
753
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
764
754
|
callHierarchy: {
|
|
765
755
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -767,14 +757,14 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
767
757
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
768
758
|
};
|
|
769
759
|
dispose: () => void | undefined;
|
|
770
|
-
context: import("@volar/language-service").
|
|
760
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
771
761
|
} | undefined;
|
|
772
762
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
773
763
|
tryAddFile: (fileName: string) => void;
|
|
774
764
|
dispose: () => void;
|
|
775
765
|
}> | undefined;
|
|
776
766
|
pathSet: (path: string, item: Promise<{
|
|
777
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
767
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
778
768
|
scripts: {
|
|
779
769
|
clear: () => void;
|
|
780
770
|
values: () => IterableIterator<{
|
|
@@ -858,7 +848,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
858
848
|
text: string;
|
|
859
849
|
};
|
|
860
850
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
861
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
862
851
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
863
852
|
callHierarchy: {
|
|
864
853
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -866,7 +855,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
866
855
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
867
856
|
};
|
|
868
857
|
dispose: () => void | undefined;
|
|
869
|
-
context: import("@volar/language-service").
|
|
858
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
870
859
|
};
|
|
871
860
|
getLanguageServiceDontCreate: () => {
|
|
872
861
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -908,7 +897,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
908
897
|
text: string;
|
|
909
898
|
};
|
|
910
899
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
911
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
912
900
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
913
901
|
callHierarchy: {
|
|
914
902
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -916,7 +904,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
916
904
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
917
905
|
};
|
|
918
906
|
dispose: () => void | undefined;
|
|
919
|
-
context: import("@volar/language-service").
|
|
907
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
920
908
|
} | undefined;
|
|
921
909
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
922
910
|
tryAddFile: (fileName: string) => void;
|
|
@@ -927,7 +915,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
927
915
|
getProjectAndTsConfig: (uri: string) => Promise<{
|
|
928
916
|
tsconfig: string;
|
|
929
917
|
project: {
|
|
930
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
918
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
931
919
|
scripts: {
|
|
932
920
|
clear: () => void;
|
|
933
921
|
values: () => IterableIterator<{
|
|
@@ -1011,7 +999,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1011
999
|
text: string;
|
|
1012
1000
|
};
|
|
1013
1001
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1014
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1015
1002
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1016
1003
|
callHierarchy: {
|
|
1017
1004
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1019,7 +1006,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1019
1006
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1020
1007
|
};
|
|
1021
1008
|
dispose: () => void | undefined;
|
|
1022
|
-
context: import("@volar/language-service").
|
|
1009
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1023
1010
|
};
|
|
1024
1011
|
getLanguageServiceDontCreate: () => {
|
|
1025
1012
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -1061,7 +1048,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1061
1048
|
text: string;
|
|
1062
1049
|
};
|
|
1063
1050
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1064
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1065
1051
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1066
1052
|
callHierarchy: {
|
|
1067
1053
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1069,7 +1055,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1069
1055
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1070
1056
|
};
|
|
1071
1057
|
dispose: () => void | undefined;
|
|
1072
|
-
context: import("@volar/language-service").
|
|
1058
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1073
1059
|
} | undefined;
|
|
1074
1060
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1075
1061
|
tryAddFile: (fileName: string) => void;
|
|
@@ -1077,7 +1063,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1077
1063
|
} | undefined;
|
|
1078
1064
|
} | undefined>;
|
|
1079
1065
|
getInferredProject: () => Promise<{
|
|
1080
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
1066
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
1081
1067
|
scripts: {
|
|
1082
1068
|
clear: () => void;
|
|
1083
1069
|
values: () => IterableIterator<{
|
|
@@ -1161,7 +1147,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1161
1147
|
text: string;
|
|
1162
1148
|
};
|
|
1163
1149
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1164
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1165
1150
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1166
1151
|
callHierarchy: {
|
|
1167
1152
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1169,7 +1154,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1169
1154
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1170
1155
|
};
|
|
1171
1156
|
dispose: () => void | undefined;
|
|
1172
|
-
context: import("@volar/language-service").
|
|
1157
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1173
1158
|
};
|
|
1174
1159
|
getLanguageServiceDontCreate: () => {
|
|
1175
1160
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -1211,7 +1196,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1211
1196
|
text: string;
|
|
1212
1197
|
};
|
|
1213
1198
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1214
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1215
1199
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1216
1200
|
callHierarchy: {
|
|
1217
1201
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1219,14 +1203,14 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1219
1203
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1220
1204
|
};
|
|
1221
1205
|
dispose: () => void | undefined;
|
|
1222
|
-
context: import("@volar/language-service").
|
|
1206
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1223
1207
|
} | undefined;
|
|
1224
1208
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1225
1209
|
tryAddFile: (fileName: string) => void;
|
|
1226
1210
|
dispose: () => void;
|
|
1227
1211
|
}>;
|
|
1228
1212
|
getInferredProjectDontCreate: () => Promise<{
|
|
1229
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
1213
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
1230
1214
|
scripts: {
|
|
1231
1215
|
clear: () => void;
|
|
1232
1216
|
values: () => IterableIterator<{
|
|
@@ -1310,7 +1294,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1310
1294
|
text: string;
|
|
1311
1295
|
};
|
|
1312
1296
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1313
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1314
1297
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1315
1298
|
callHierarchy: {
|
|
1316
1299
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1318,7 +1301,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1318
1301
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1319
1302
|
};
|
|
1320
1303
|
dispose: () => void | undefined;
|
|
1321
|
-
context: import("@volar/language-service").
|
|
1304
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1322
1305
|
};
|
|
1323
1306
|
getLanguageServiceDontCreate: () => {
|
|
1324
1307
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -1360,7 +1343,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1360
1343
|
text: string;
|
|
1361
1344
|
};
|
|
1362
1345
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1363
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1364
1346
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1365
1347
|
callHierarchy: {
|
|
1366
1348
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1368,7 +1350,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1368
1350
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1369
1351
|
};
|
|
1370
1352
|
dispose: () => void | undefined;
|
|
1371
|
-
context: import("@volar/language-service").
|
|
1353
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1372
1354
|
} | undefined;
|
|
1373
1355
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1374
1356
|
tryAddFile: (fileName: string) => void;
|
|
@@ -1380,7 +1362,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1380
1362
|
getProject: (uri: string) => Promise<{
|
|
1381
1363
|
tsconfig: string;
|
|
1382
1364
|
project: {
|
|
1383
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
1365
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
1384
1366
|
scripts: {
|
|
1385
1367
|
clear: () => void;
|
|
1386
1368
|
values: () => IterableIterator<{
|
|
@@ -1464,7 +1446,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1464
1446
|
text: string;
|
|
1465
1447
|
};
|
|
1466
1448
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1467
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1468
1449
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1469
1450
|
callHierarchy: {
|
|
1470
1451
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1472,7 +1453,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1472
1453
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1473
1454
|
};
|
|
1474
1455
|
dispose: () => void | undefined;
|
|
1475
|
-
context: import("@volar/language-service").
|
|
1456
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1476
1457
|
};
|
|
1477
1458
|
getLanguageServiceDontCreate: () => {
|
|
1478
1459
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -1514,7 +1495,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1514
1495
|
text: string;
|
|
1515
1496
|
};
|
|
1516
1497
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1517
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1518
1498
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1519
1499
|
callHierarchy: {
|
|
1520
1500
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1522,7 +1502,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1522
1502
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1523
1503
|
};
|
|
1524
1504
|
dispose: () => void | undefined;
|
|
1525
|
-
context: import("@volar/language-service").
|
|
1505
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1526
1506
|
} | undefined;
|
|
1527
1507
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1528
1508
|
tryAddFile: (fileName: string) => void;
|
|
@@ -1531,7 +1511,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1531
1511
|
} | {
|
|
1532
1512
|
tsconfig: undefined;
|
|
1533
1513
|
project: {
|
|
1534
|
-
tsConfig: import("typesafe-path").PosixPath
|
|
1514
|
+
tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
|
|
1535
1515
|
scripts: {
|
|
1536
1516
|
clear: () => void;
|
|
1537
1517
|
values: () => IterableIterator<{
|
|
@@ -1615,7 +1595,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1615
1595
|
text: string;
|
|
1616
1596
|
};
|
|
1617
1597
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1618
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1619
1598
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1620
1599
|
callHierarchy: {
|
|
1621
1600
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1623,7 +1602,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1623
1602
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1624
1603
|
};
|
|
1625
1604
|
dispose: () => void | undefined;
|
|
1626
|
-
context: import("@volar/language-service").
|
|
1605
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1627
1606
|
};
|
|
1628
1607
|
getLanguageServiceDontCreate: () => {
|
|
1629
1608
|
format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
|
|
@@ -1665,7 +1644,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1665
1644
|
text: string;
|
|
1666
1645
|
};
|
|
1667
1646
|
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
1668
|
-
doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
|
|
1669
1647
|
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
1670
1648
|
callHierarchy: {
|
|
1671
1649
|
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
@@ -1673,7 +1651,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1673
1651
|
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
1674
1652
|
};
|
|
1675
1653
|
dispose: () => void | undefined;
|
|
1676
|
-
context: import("@volar/language-service").
|
|
1654
|
+
context: import("@volar/language-service").LanguageServicePluginContext;
|
|
1677
1655
|
} | undefined;
|
|
1678
1656
|
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
1679
1657
|
tryAddFile: (fileName: string) => void;
|
package/out/common/workspaces.js
CHANGED
|
@@ -130,18 +130,9 @@ function createWorkspaces(context) {
|
|
|
130
130
|
return;
|
|
131
131
|
const languageService = project.getLanguageService();
|
|
132
132
|
const errors = yield languageService.doValidation(uri, cancel, result => {
|
|
133
|
-
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result
|
|
133
|
+
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result, version });
|
|
134
134
|
});
|
|
135
|
-
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors
|
|
136
|
-
function addVersion(error) {
|
|
137
|
-
if (error.data === undefined) {
|
|
138
|
-
error.data = { version };
|
|
139
|
-
}
|
|
140
|
-
else if (typeof error.data === 'object') {
|
|
141
|
-
error.data.version = version;
|
|
142
|
-
}
|
|
143
|
-
return error;
|
|
144
|
-
}
|
|
135
|
+
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors, version });
|
|
145
136
|
});
|
|
146
137
|
}
|
|
147
138
|
function getProjectAndTsConfig(uri) {
|
package/out/types.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import type { FileSystemProvider } from 'vscode-html-languageservice';
|
|
|
5
5
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
6
6
|
import * as vscode from 'vscode-languageserver';
|
|
7
7
|
import { URI } from 'vscode-uri';
|
|
8
|
-
import {
|
|
8
|
+
import { Config, LanguageServicePluginContext } from '@volar/language-service';
|
|
9
|
+
import { ProjectContext } from './common/project';
|
|
9
10
|
export type FileSystemHost = {
|
|
10
11
|
ready(connection: vscode.Connection): void;
|
|
11
12
|
reload(): void;
|
|
@@ -26,16 +27,20 @@ export interface RuntimeEnvironment {
|
|
|
26
27
|
setImmediate(callback: (...args: any[]) => void, ...args: any[]): vscode.Disposable;
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
export
|
|
30
|
+
export interface LanguageServiceContext {
|
|
31
|
+
project: ProjectContext;
|
|
32
|
+
env: LanguageServicePluginContext['env'];
|
|
33
|
+
host: embedded.LanguageServiceHost;
|
|
34
|
+
sys: FileSystem;
|
|
35
|
+
}
|
|
36
|
+
export type LanguageServerPlugin<A extends LanguageServerInitializationOptions = LanguageServerInitializationOptions, C = embeddedLS.LanguageService> = (initOptions: A) => {
|
|
30
37
|
tsconfigExtraFileExtensions: ts.FileExtensionInfo[];
|
|
31
38
|
diagnosticDocumentSelector: vscode.DocumentSelector;
|
|
32
39
|
extensions: {
|
|
33
40
|
fileRenameOperationFilter: string[];
|
|
34
41
|
fileWatcher: string[];
|
|
35
42
|
};
|
|
36
|
-
|
|
37
|
-
getLanguageModules?(host: B): embedded.LanguageModule[];
|
|
38
|
-
getLanguageServicePlugins?(host: B, context: LanguageServiceRuntimeContext): embeddedLS.LanguageServicePlugin[];
|
|
43
|
+
resolveConfig?(config: Config, ctx: LanguageServiceContext): void;
|
|
39
44
|
onInitialize?(_: vscode.InitializeResult): void;
|
|
40
45
|
onInitialized?(getLanguageService: (uri: string) => Promise<C>): void;
|
|
41
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-alpha.10",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"directory": "packages/language-server"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/language-core": "1.
|
|
21
|
-
"@volar/language-service": "1.
|
|
22
|
-
"@volar/shared": "1.
|
|
23
|
-
"@vscode/l10n": "^0.0.
|
|
24
|
-
"request-light": "^0.
|
|
20
|
+
"@volar/language-core": "1.2.0-alpha.10",
|
|
21
|
+
"@volar/language-service": "1.2.0-alpha.10",
|
|
22
|
+
"@volar/shared": "1.2.0-alpha.10",
|
|
23
|
+
"@vscode/l10n": "^0.0.11",
|
|
24
|
+
"request-light": "^0.7.0",
|
|
25
25
|
"typesafe-path": "^0.2.2",
|
|
26
|
-
"vscode-html-languageservice": "^5.0.
|
|
27
|
-
"vscode-languageserver": "^8.0
|
|
28
|
-
"vscode-languageserver-protocol": "^3.17.
|
|
26
|
+
"vscode-html-languageservice": "^5.0.4",
|
|
27
|
+
"vscode-languageserver": "^8.1.0",
|
|
28
|
+
"vscode-languageserver-protocol": "^3.17.3",
|
|
29
29
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
30
30
|
"vscode-uri": "^3.0.7"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c0b7580b14966d28d7c6df5da9baa41111f9f8d9"
|
|
33
33
|
}
|