@volar/language-server 1.0.0-rc.4 → 1.0.0-rc.5

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/types.d.ts CHANGED
@@ -29,12 +29,12 @@ export type LanguageServerPlugin<A extends LanguageServerInitializationOptions =
29
29
  semanticService?: {
30
30
  semanticTokenLegend?: vscode.SemanticTokensLegend;
31
31
  resolveLanguageServiceHost?(ts: typeof import('typescript/lib/tsserverlibrary'), sys: FileSystem, tsConfig: string | ts.CompilerOptions, host: embedded.LanguageServiceHost): B;
32
- getLanguageModules?(host: B): embedded.EmbeddedLanguageModule[];
32
+ getLanguageModules?(host: B): embedded.LanguageModule[];
33
33
  getServicePlugins?(host: B, service: embeddedLS.LanguageService): embeddedLS.LanguageServicePlugin[];
34
34
  onInitialize?(connection: vscode.Connection, getLangaugeService: (uri: string) => Promise<C>): void;
35
35
  };
36
36
  syntacticService?: {
37
- getLanguageModules?(ts: typeof import('typescript/lib/tsserverlibrary'), env: embeddedLS.LanguageServicePluginContext['env']): embedded.EmbeddedLanguageModule[];
37
+ getLanguageModules?(ts: typeof import('typescript/lib/tsserverlibrary'), env: embeddedLS.LanguageServicePluginContext['env']): embedded.LanguageModule[];
38
38
  getServicePlugins?(context: embeddedLS.DocumentServiceRuntimeContext): embeddedLS.LanguageServicePlugin[];
39
39
  onInitialize?(connection: vscode.Connection): void;
40
40
  };
@@ -31,11 +31,8 @@ function createWorkspaces(runtimeEnv, plugins, fsHost, configurationHost, ts, ts
31
31
  fsHost.onDidChangeWatchedFiles(params => {
32
32
  const tsConfigChanges = params.changes.filter(change => workspaceProjects_1.rootTsConfigNames.includes(change.uri.substring(change.uri.lastIndexOf('/') + 1)));
33
33
  if (tsConfigChanges.length) {
34
- for (const doc of documents.data.values()) {
35
- connection.sendDiagnostics({ uri: doc.uri, diagnostics: [] });
36
- }
34
+ reloadDiagnostics();
37
35
  }
38
- onDriveFileUpdated();
39
36
  });
40
37
  (_a = runtimeEnv.onDidChangeConfiguration) === null || _a === void 0 ? void 0 : _a.call(runtimeEnv, () => __awaiter(this, void 0, void 0, function* () {
41
38
  onDriveFileUpdated();
@@ -62,8 +59,15 @@ function createWorkspaces(runtimeEnv, plugins, fsHost, configurationHost, ts, ts
62
59
  for (const [_, workspace] of workspaces) {
63
60
  (yield workspace).reload();
64
61
  }
62
+ reloadDiagnostics();
65
63
  });
66
64
  }
65
+ function reloadDiagnostics() {
66
+ for (const doc of documents.data.values()) {
67
+ connection.sendDiagnostics({ uri: doc.uri, diagnostics: [] });
68
+ }
69
+ onDriveFileUpdated();
70
+ }
67
71
  function onDriveFileUpdated() {
68
72
  var _a, _b;
69
73
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "1.0.0-rc.4",
3
+ "version": "1.0.0-rc.5",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,9 +17,9 @@
17
17
  "directory": "packages/language-server"
18
18
  },
19
19
  "dependencies": {
20
- "@volar/language-core": "1.0.0-rc.4",
21
- "@volar/language-service": "1.0.0-rc.4",
22
- "@volar/shared": "1.0.0-rc.4",
20
+ "@volar/language-core": "1.0.0-rc.5",
21
+ "@volar/language-service": "1.0.0-rc.5",
22
+ "@volar/shared": "1.0.0-rc.5",
23
23
  "request-light": "^0.5.8",
24
24
  "typesafe-path": "^0.2.1",
25
25
  "vscode-html-languageservice": "^5.0.1",
@@ -28,5 +28,5 @@
28
28
  "vscode-languageserver-textdocument": "^1.0.7",
29
29
  "vscode-uri": "^3.0.3"
30
30
  },
31
- "gitHead": "eadcf13bb66b02e190ab61eca8fe1a9e6cf84207"
31
+ "gitHead": "21006891299e4a81b0be2e179129f0d0983c70d3"
32
32
  }