@volar/language-server 1.4.0-alpha.10 → 1.4.0-alpha.11

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.
@@ -12,7 +12,7 @@ export interface ProjectContext {
12
12
  }
13
13
  export type Project = ReturnType<typeof createProject>;
14
14
  export declare function createProject(context: ProjectContext): Promise<{
15
- tsConfig: ts.CompilerOptions | path.PosixPath;
15
+ tsConfig: path.PosixPath | ts.CompilerOptions;
16
16
  scripts: {
17
17
  clear: () => void;
18
18
  values: () => IterableIterator<{
@@ -295,10 +295,7 @@ function getDocumentContext(fileNameToUri, uriToFileName, ts, host, rootUri) {
295
295
  return ref;
296
296
  }
297
297
  if (ref[0] === '/') { // resolve absolute path against the current workspace folder
298
- const folderUri = rootUri;
299
- if (folderUri) {
300
- return folderUri + ref.substr(1);
301
- }
298
+ return rootUri + ref;
302
299
  }
303
300
  const baseUri = vscode_uri_1.URI.parse(base);
304
301
  const baseUriDir = baseUri.path.endsWith('/') ? baseUri : vscode_uri_1.Utils.dirname(baseUri);
@@ -48,7 +48,7 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
48
48
  }
49
49
  server.documentHighlightProvider = true;
50
50
  server.documentLinkProvider = {
51
- resolveProvider: false, // TODO
51
+ resolveProvider: true,
52
52
  };
53
53
  server.codeLensProvider = {
54
54
  resolveProvider: true,
@@ -72,7 +72,9 @@ function setupCapabilities(server, initOptions, plugins, semanticTokensLegend, l
72
72
  ],
73
73
  resolveProvider: true,
74
74
  };
75
- server.inlayHintProvider = true;
75
+ server.inlayHintProvider = {
76
+ resolveProvider: true,
77
+ };
76
78
  const exts = plugins.map(plugin => plugin.watchFileExtensions).flat();
77
79
  if (exts.length) {
78
80
  server.workspace = {
@@ -13,7 +13,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
13
13
  projects: {
14
14
  clear: () => void;
15
15
  values: () => IterableIterator<Promise<{
16
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
16
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
17
17
  scripts: {
18
18
  clear: () => void;
19
19
  values: () => IterableIterator<{
@@ -159,7 +159,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
159
159
  }>>;
160
160
  uriDelete: (_uri: string) => boolean;
161
161
  uriGet: (_uri: string) => Promise<{
162
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
162
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
163
163
  scripts: {
164
164
  clear: () => void;
165
165
  values: () => IterableIterator<{
@@ -305,7 +305,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
305
305
  }> | undefined;
306
306
  uriHas: (_uri: string) => boolean;
307
307
  uriSet: (_uri: string, item: Promise<{
308
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
308
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
309
309
  scripts: {
310
310
  clear: () => void;
311
311
  values: () => IterableIterator<{
@@ -451,7 +451,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
451
451
  }>) => void;
452
452
  pathDelete: (path: string) => boolean;
453
453
  pathGet: (path: string) => Promise<{
454
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
454
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
455
455
  scripts: {
456
456
  clear: () => void;
457
457
  values: () => IterableIterator<{
@@ -596,7 +596,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
596
596
  dispose: () => void;
597
597
  }> | undefined;
598
598
  pathHas: (path: string) => Promise<{
599
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
599
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
600
600
  scripts: {
601
601
  clear: () => void;
602
602
  values: () => IterableIterator<{
@@ -741,7 +741,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
741
741
  dispose: () => void;
742
742
  }> | undefined;
743
743
  pathSet: (path: string, item: Promise<{
744
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
744
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
745
745
  scripts: {
746
746
  clear: () => void;
747
747
  values: () => IterableIterator<{
@@ -890,7 +890,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
890
890
  getProjectAndTsConfig: (uri: string) => Promise<{
891
891
  tsconfig: string;
892
892
  project: {
893
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
893
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
894
894
  scripts: {
895
895
  clear: () => void;
896
896
  values: () => IterableIterator<{
@@ -1036,7 +1036,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1036
1036
  } | undefined;
1037
1037
  } | undefined>;
1038
1038
  getInferredProject: () => Promise<{
1039
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
1039
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
1040
1040
  scripts: {
1041
1041
  clear: () => void;
1042
1042
  values: () => IterableIterator<{
@@ -1181,7 +1181,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1181
1181
  dispose: () => void;
1182
1182
  }>;
1183
1183
  getInferredProjectDontCreate: () => Promise<{
1184
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
1184
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
1185
1185
  scripts: {
1186
1186
  clear: () => void;
1187
1187
  values: () => IterableIterator<{
@@ -26,7 +26,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
26
26
  projects: {
27
27
  clear: () => void;
28
28
  values: () => IterableIterator<Promise<{
29
- tsConfig: ts.CompilerOptions | path.PosixPath;
29
+ tsConfig: path.PosixPath | ts.CompilerOptions;
30
30
  scripts: {
31
31
  clear: () => void;
32
32
  values: () => IterableIterator<{
@@ -172,7 +172,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
172
172
  }>>;
173
173
  uriDelete: (_uri: string) => boolean;
174
174
  uriGet: (_uri: string) => Promise<{
175
- tsConfig: ts.CompilerOptions | path.PosixPath;
175
+ tsConfig: path.PosixPath | ts.CompilerOptions;
176
176
  scripts: {
177
177
  clear: () => void;
178
178
  values: () => IterableIterator<{
@@ -318,7 +318,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
318
318
  }> | undefined;
319
319
  uriHas: (_uri: string) => boolean;
320
320
  uriSet: (_uri: string, item: Promise<{
321
- tsConfig: ts.CompilerOptions | path.PosixPath;
321
+ tsConfig: path.PosixPath | ts.CompilerOptions;
322
322
  scripts: {
323
323
  clear: () => void;
324
324
  values: () => IterableIterator<{
@@ -464,7 +464,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
464
464
  }>) => void;
465
465
  pathDelete: (path: string) => boolean;
466
466
  pathGet: (path: string) => Promise<{
467
- tsConfig: ts.CompilerOptions | path.PosixPath;
467
+ tsConfig: path.PosixPath | ts.CompilerOptions;
468
468
  scripts: {
469
469
  clear: () => void;
470
470
  values: () => IterableIterator<{
@@ -609,7 +609,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
609
609
  dispose: () => void;
610
610
  }> | undefined;
611
611
  pathHas: (path: string) => Promise<{
612
- tsConfig: ts.CompilerOptions | path.PosixPath;
612
+ tsConfig: path.PosixPath | ts.CompilerOptions;
613
613
  scripts: {
614
614
  clear: () => void;
615
615
  values: () => IterableIterator<{
@@ -754,7 +754,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
754
754
  dispose: () => void;
755
755
  }> | undefined;
756
756
  pathSet: (path: string, item: Promise<{
757
- tsConfig: ts.CompilerOptions | path.PosixPath;
757
+ tsConfig: path.PosixPath | ts.CompilerOptions;
758
758
  scripts: {
759
759
  clear: () => void;
760
760
  values: () => IterableIterator<{
@@ -903,7 +903,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
903
903
  getProjectAndTsConfig: (uri: string) => Promise<{
904
904
  tsconfig: string;
905
905
  project: {
906
- tsConfig: ts.CompilerOptions | path.PosixPath;
906
+ tsConfig: path.PosixPath | ts.CompilerOptions;
907
907
  scripts: {
908
908
  clear: () => void;
909
909
  values: () => IterableIterator<{
@@ -1049,7 +1049,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1049
1049
  } | undefined;
1050
1050
  } | undefined>;
1051
1051
  getInferredProject: () => Promise<{
1052
- tsConfig: ts.CompilerOptions | path.PosixPath;
1052
+ tsConfig: path.PosixPath | ts.CompilerOptions;
1053
1053
  scripts: {
1054
1054
  clear: () => void;
1055
1055
  values: () => IterableIterator<{
@@ -1194,7 +1194,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1194
1194
  dispose: () => void;
1195
1195
  }>;
1196
1196
  getInferredProjectDontCreate: () => Promise<{
1197
- tsConfig: ts.CompilerOptions | path.PosixPath;
1197
+ tsConfig: path.PosixPath | ts.CompilerOptions;
1198
1198
  scripts: {
1199
1199
  clear: () => void;
1200
1200
  values: () => IterableIterator<{
@@ -1344,7 +1344,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1344
1344
  getProject: (uri: string) => Promise<{
1345
1345
  tsconfig: string;
1346
1346
  project: {
1347
- tsConfig: ts.CompilerOptions | path.PosixPath;
1347
+ tsConfig: path.PosixPath | ts.CompilerOptions;
1348
1348
  scripts: {
1349
1349
  clear: () => void;
1350
1350
  values: () => IterableIterator<{
@@ -1491,7 +1491,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1491
1491
  } | {
1492
1492
  tsconfig: undefined;
1493
1493
  project: {
1494
- tsConfig: ts.CompilerOptions | path.PosixPath;
1494
+ tsConfig: path.PosixPath | ts.CompilerOptions;
1495
1495
  scripts: {
1496
1496
  clear: () => void;
1497
1497
  values: () => IterableIterator<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "1.4.0-alpha.10",
3
+ "version": "1.4.0-alpha.11",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,8 +17,8 @@
17
17
  "directory": "packages/language-server"
18
18
  },
19
19
  "dependencies": {
20
- "@volar/language-core": "1.4.0-alpha.10",
21
- "@volar/language-service": "1.4.0-alpha.10",
20
+ "@volar/language-core": "1.4.0-alpha.11",
21
+ "@volar/language-service": "1.4.0-alpha.11",
22
22
  "@vscode/l10n": "^0.0.11",
23
23
  "request-light": "^0.7.0",
24
24
  "typesafe-path": "^0.2.2",
@@ -28,5 +28,5 @@
28
28
  "vscode-languageserver-textdocument": "^1.0.8",
29
29
  "vscode-uri": "^3.0.7"
30
30
  },
31
- "gitHead": "715bc5f17a0d1cadd4190712dcaff732989eb330"
31
+ "gitHead": "56ab336278ed7f06851c3dfe1bbcd5b9a3112846"
32
32
  }