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

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.
@@ -261,10 +261,6 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
261
261
  return await lastInlayHintLs.doInlayHintResolve(hint, token);
262
262
  });
263
263
  connection.workspace.onWillRenameFiles(async (params, token) => {
264
- const config = await connection.workspace.getConfiguration('volar.updateImportsOnFileMove.enabled');
265
- if (!config) {
266
- return null;
267
- }
268
264
  const _edits = await Promise.all(params.files.map(async (file) => {
269
265
  return await worker(file.oldUri, token, service => {
270
266
  return service.getEditsForFileRename(file.oldUri, file.newUri, token) ?? null;
@@ -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);
@@ -99,7 +99,6 @@ function startCommonLanguageServer(connection, getCtx) {
99
99
  });
100
100
  }
101
101
  if (options.serverMode !== types_1.ServerMode.Syntactic
102
- && !options.disableFileWatcher
103
102
  && initParams.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration) {
104
103
  const exts = plugins.map(plugin => plugin.watchFileExtensions).flat();
105
104
  if (exts.length) {
@@ -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 = {
@@ -64,7 +64,7 @@ function createWorkspaces(context) {
64
64
  async function updateDiagnosticsAndSemanticTokens() {
65
65
  const req = ++semanticTokensReq;
66
66
  await updateDiagnostics();
67
- const delay = await context.configurationHost?.getConfiguration('volar.diagnostics.delay') ?? 200;
67
+ const delay = 250;
68
68
  await sleep(delay);
69
69
  if (req === semanticTokensReq) {
70
70
  if (context.initParams.capabilities.textDocument?.semanticTokens) {
@@ -79,7 +79,7 @@ function createWorkspaces(context) {
79
79
  if ((context.initOptions.diagnosticModel ?? types_1.DiagnosticModel.Push) !== types_1.DiagnosticModel.Push)
80
80
  return;
81
81
  const req = ++documentUpdatedReq;
82
- const delay = await context.configurationHost?.getConfiguration('volar.diagnostics.delay') ?? 200;
82
+ const delay = 250;
83
83
  const cancel = context.cancelTokenHost.createCancellationToken({
84
84
  get isCancellationRequested() {
85
85
  return req !== documentUpdatedReq;
package/out/types.d.ts CHANGED
@@ -92,7 +92,6 @@ export interface LanguageServerInitializationOptions {
92
92
  */
93
93
  cancellationPipeName?: string;
94
94
  reverseConfigFilePriority?: boolean;
95
- disableFileWatcher?: boolean;
96
95
  maxFileSize?: number;
97
96
  configFilePath?: string;
98
97
  /**
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.12",
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.12",
21
+ "@volar/language-service": "1.4.0-alpha.12",
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": "5ae44d90936045b92ad9debcfb9ae952bb311fb8"
32
32
  }