@volar/language-server 1.0.22 → 1.1.0-1.2.0-alpha.1.0

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/protocol.js CHANGED
@@ -6,53 +6,53 @@ const vscode = require("vscode-languageserver-protocol");
6
6
  */
7
7
  var ShowReferencesNotification;
8
8
  (function (ShowReferencesNotification) {
9
- ShowReferencesNotification.type = new vscode.NotificationType('vue.findReferences');
9
+ ShowReferencesNotification.type = new vscode.NotificationType('volar/server/showReferences');
10
10
  })(ShowReferencesNotification = exports.ShowReferencesNotification || (exports.ShowReferencesNotification = {}));
11
11
  var FsStatRequest;
12
12
  (function (FsStatRequest) {
13
- FsStatRequest.type = new vscode.RequestType('fs/stat');
13
+ FsStatRequest.type = new vscode.RequestType('volar/server/fs/stat');
14
14
  })(FsStatRequest = exports.FsStatRequest || (exports.FsStatRequest = {}));
15
15
  var FsReadFileRequest;
16
16
  (function (FsReadFileRequest) {
17
- FsReadFileRequest.type = new vscode.RequestType('fs/readFile');
17
+ FsReadFileRequest.type = new vscode.RequestType('volar/server/fs/readFile');
18
18
  })(FsReadFileRequest = exports.FsReadFileRequest || (exports.FsReadFileRequest = {}));
19
19
  var FsReadDirectoryRequest;
20
20
  (function (FsReadDirectoryRequest) {
21
- FsReadDirectoryRequest.type = new vscode.RequestType('fs/readDirectory');
21
+ FsReadDirectoryRequest.type = new vscode.RequestType('volar/server/fs/readDirectory');
22
22
  })(FsReadDirectoryRequest = exports.FsReadDirectoryRequest || (exports.FsReadDirectoryRequest = {}));
23
23
  /**
24
24
  * Client request server
25
25
  */
26
26
  var FindFileReferenceRequest;
27
27
  (function (FindFileReferenceRequest) {
28
- FindFileReferenceRequest.type = new vscode.RequestType('vue/findFileReference');
28
+ FindFileReferenceRequest.type = new vscode.RequestType('volar/client/findFileReference');
29
29
  })(FindFileReferenceRequest = exports.FindFileReferenceRequest || (exports.FindFileReferenceRequest = {}));
30
30
  var GetMatchTsConfigRequest;
31
31
  (function (GetMatchTsConfigRequest) {
32
- GetMatchTsConfigRequest.type = new vscode.RequestType('volar/tsconfig');
32
+ GetMatchTsConfigRequest.type = new vscode.RequestType('volar/client/tsconfig');
33
33
  })(GetMatchTsConfigRequest = exports.GetMatchTsConfigRequest || (exports.GetMatchTsConfigRequest = {}));
34
34
  var AutoInsertRequest;
35
35
  (function (AutoInsertRequest) {
36
- AutoInsertRequest.type = new vscode.RequestType('vue/autoInsert');
36
+ AutoInsertRequest.type = new vscode.RequestType('volar/client/autoInsert');
37
37
  })(AutoInsertRequest = exports.AutoInsertRequest || (exports.AutoInsertRequest = {}));
38
38
  var WriteVirtualFilesNotification;
39
39
  (function (WriteVirtualFilesNotification) {
40
- WriteVirtualFilesNotification.type = new vscode.NotificationType('volar.action.writeVirtualFiles');
40
+ WriteVirtualFilesNotification.type = new vscode.NotificationType('volar/client/writeVirtualFiles');
41
41
  })(WriteVirtualFilesNotification = exports.WriteVirtualFilesNotification || (exports.WriteVirtualFilesNotification = {}));
42
42
  var ReloadProjectNotification;
43
43
  (function (ReloadProjectNotification) {
44
- ReloadProjectNotification.type = new vscode.NotificationType('volar.action.reloadProject');
44
+ ReloadProjectNotification.type = new vscode.NotificationType('volar/client/reloadProject');
45
45
  })(ReloadProjectNotification = exports.ReloadProjectNotification || (exports.ReloadProjectNotification = {}));
46
46
  var GetVirtualFileNamesRequest;
47
47
  (function (GetVirtualFileNamesRequest) {
48
- GetVirtualFileNamesRequest.type = new vscode.RequestType('vue/virtualFileNames');
48
+ GetVirtualFileNamesRequest.type = new vscode.RequestType('volar/client/virtualFileNames');
49
49
  })(GetVirtualFileNamesRequest = exports.GetVirtualFileNamesRequest || (exports.GetVirtualFileNamesRequest = {}));
50
50
  var GetVirtualFileRequest;
51
51
  (function (GetVirtualFileRequest) {
52
- GetVirtualFileRequest.type = new vscode.RequestType('vue/virtualFile');
52
+ GetVirtualFileRequest.type = new vscode.RequestType('volar/client/virtualFile');
53
53
  })(GetVirtualFileRequest = exports.GetVirtualFileRequest || (exports.GetVirtualFileRequest = {}));
54
54
  var ReportStats;
55
55
  (function (ReportStats) {
56
- ReportStats.type = new vscode.NotificationType0('vue/stats');
56
+ ReportStats.type = new vscode.NotificationType0('volar/client/stats');
57
57
  })(ReportStats = exports.ReportStats || (exports.ReportStats = {}));
58
58
  //# sourceMappingURL=protocol.js.map
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 { LanguageServiceRuntimeContext } from '@volar/language-service';
8
+ import { LanguageServiceConfig, LanguageServiceRuntimeContext } 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;
@@ -22,13 +23,26 @@ export interface RuntimeEnvironment {
22
23
  onDidChangeConfiguration?: (settings: any) => void;
23
24
  fileSystemProvide: FileSystemProvider | undefined;
24
25
  createFileSystemHost: (ts: typeof import('typescript/lib/tsserverlibrary'), capabilities: vscode.ClientCapabilities) => FileSystemHost;
26
+ readonly timer: {
27
+ setImmediate(callback: (...args: any[]) => void, ...args: any[]): vscode.Disposable;
28
+ };
29
+ }
30
+ export interface LanguageServiceContext {
31
+ project: ProjectContext;
32
+ env: LanguageServiceRuntimeContext['env'];
33
+ host: embedded.LanguageServiceHost;
34
+ sys: FileSystem;
25
35
  }
26
- export type LanguageServerPlugin<A extends LanguageServerInitializationOptions = LanguageServerInitializationOptions, B extends embedded.LanguageServiceHost = embedded.LanguageServiceHost, C = embeddedLS.LanguageService> = (initOptions: A) => {
27
- extraFileExtensions?: ts.FileExtensionInfo[];
28
- resolveLanguageServiceHost?(ts: typeof import('typescript/lib/tsserverlibrary'), sys: FileSystem, tsConfig: string | ts.CompilerOptions, host: embedded.LanguageServiceHost): B;
29
- getLanguageModules?(host: B): embedded.LanguageModule[];
30
- getLanguageServicePlugins?(host: B, context: LanguageServiceRuntimeContext): embeddedLS.LanguageServicePlugin[];
31
- onInitialize?(connection: vscode.Connection, getLanguageService: (uri: string) => Promise<C>): void;
36
+ export type LanguageServerPlugin<A extends LanguageServerInitializationOptions = LanguageServerInitializationOptions, C = embeddedLS.LanguageService> = (initOptions: A) => {
37
+ tsconfigExtraFileExtensions: ts.FileExtensionInfo[];
38
+ diagnosticDocumentSelector: vscode.DocumentSelector;
39
+ extensions: {
40
+ fileRenameOperationFilter: string[];
41
+ fileWatcher: string[];
42
+ };
43
+ resolveConfig?(config: LanguageServiceConfig, ctx: LanguageServiceContext): void;
44
+ onInitialize?(_: vscode.InitializeResult): void;
45
+ onInitialized?(getLanguageService: (uri: string) => Promise<C>): void;
32
46
  };
33
47
  export declare enum ServerMode {
34
48
  Semantic = 0,
@@ -43,6 +57,9 @@ export interface LanguageServerInitializationOptions {
43
57
  typescript?: {
44
58
  tsdk: string;
45
59
  };
60
+ l10n?: {
61
+ location: string;
62
+ };
46
63
  serverMode?: ServerMode;
47
64
  diagnosticModel?: DiagnosticModel;
48
65
  textDocumentSync?: vscode.TextDocumentSyncKind | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "1.0.22",
3
+ "version": "1.1.0-1.2.0-alpha.1.0",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -13,13 +13,14 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/johnsoncodehk/volar.git",
16
+ "url": "https://github.com/volarjs/volar.js.git",
17
17
  "directory": "packages/language-server"
18
18
  },
19
19
  "dependencies": {
20
- "@volar/language-core": "1.0.22",
21
- "@volar/language-service": "1.0.22",
22
- "@volar/shared": "1.0.22",
20
+ "@volar/language-core": "1.1.0-1.2.0-alpha.1.0",
21
+ "@volar/language-service": "1.1.0-1.2.0-alpha.1.0",
22
+ "@volar/shared": "1.1.0-1.2.0-alpha.1.0",
23
+ "@vscode/l10n": "^0.0.10",
23
24
  "request-light": "^0.6.0",
24
25
  "typesafe-path": "^0.2.2",
25
26
  "vscode-html-languageservice": "^5.0.3",
@@ -28,5 +29,5 @@
28
29
  "vscode-languageserver-textdocument": "^1.0.8",
29
30
  "vscode-uri": "^3.0.7"
30
31
  },
31
- "gitHead": "eed05323d6fe1d8eda712f63bb765ba57bdd40ae"
32
+ "gitHead": "ffc1267f2766722751551182ce1e717be661247a"
32
33
  }