@volar/language-server 1.4.0-alpha.9 → 1.4.1
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/languageFeatures.js +10 -5
- package/out/common/project.d.ts +7 -3
- package/out/common/project.js +2 -5
- package/out/common/server.js +4 -4
- package/out/common/utils/registerFeatures.js +4 -2
- package/out/common/workspace.d.ts +63 -27
- package/out/common/workspaces.d.ts +77 -33
- package/out/common/workspaces.js +10 -6
- package/out/types.d.ts +4 -5
- package/package.json +4 -4
package/out/common/workspaces.js
CHANGED
|
@@ -64,7 +64,7 @@ function createWorkspaces(context) {
|
|
|
64
64
|
async function updateDiagnosticsAndSemanticTokens() {
|
|
65
65
|
const req = ++semanticTokensReq;
|
|
66
66
|
await updateDiagnostics();
|
|
67
|
-
const delay =
|
|
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 =
|
|
82
|
+
const delay = 250;
|
|
83
83
|
const cancel = context.cancelTokenHost.createCancellationToken({
|
|
84
84
|
get isCancellationRequested() {
|
|
85
85
|
return req !== documentUpdatedReq;
|
|
@@ -107,11 +107,15 @@ function createWorkspaces(context) {
|
|
|
107
107
|
const project = (await getProjectAndTsConfig(uri))?.project;
|
|
108
108
|
if (!project)
|
|
109
109
|
return;
|
|
110
|
+
// fix https://github.com/vuejs/language-tools/issues/2627
|
|
111
|
+
if (context.initOptions.serverMode === types_1.ServerMode.Syntactic) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
// const mode = context.initOptions.serverMode === ServerMode.PartialSemantic ? 'semantic' as const
|
|
115
|
+
// : context.initOptions.serverMode === ServerMode.Syntactic ? 'syntactic' as const
|
|
116
|
+
// : 'all' as const;
|
|
110
117
|
const languageService = project.getLanguageService();
|
|
111
|
-
const
|
|
112
|
-
: context.initOptions.serverMode === types_1.ServerMode.Syntactic ? 'syntactic'
|
|
113
|
-
: 'all';
|
|
114
|
-
const errors = await languageService.doValidation(uri, mode, cancel, result => {
|
|
118
|
+
const errors = await languageService.doValidation(uri, 'all', cancel, result => {
|
|
115
119
|
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result, version });
|
|
116
120
|
});
|
|
117
121
|
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors, version });
|
package/out/types.d.ts
CHANGED
|
@@ -36,12 +36,12 @@ export interface LanguageServiceContext {
|
|
|
36
36
|
sys: FileSystem;
|
|
37
37
|
}
|
|
38
38
|
export interface LanguageServerPlugin {
|
|
39
|
-
(initOptions: LanguageServerInitializationOptions
|
|
39
|
+
(initOptions: LanguageServerInitializationOptions, modules: {
|
|
40
|
+
typescript?: typeof import('typescript/lib/tsserverlibrary');
|
|
41
|
+
}): {
|
|
40
42
|
extraFileExtensions?: ts.FileExtensionInfo[];
|
|
41
43
|
watchFileExtensions?: string[];
|
|
42
|
-
resolveConfig?(config: Config,
|
|
43
|
-
typescript?: typeof import('typescript/lib/tsserverlibrary');
|
|
44
|
-
}, ctx?: LanguageServiceContext): Config;
|
|
44
|
+
resolveConfig?(config: Config, ctx: LanguageServiceContext | undefined): Config;
|
|
45
45
|
onInitialized?(getLanguageService: (uri: string) => Promise<LanguageService | undefined>, env: RuntimeEnvironment): void;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -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.
|
|
3
|
+
"version": "1.4.1",
|
|
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.
|
|
21
|
-
"@volar/language-service": "1.4.
|
|
20
|
+
"@volar/language-core": "1.4.1",
|
|
21
|
+
"@volar/language-service": "1.4.1",
|
|
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": "
|
|
31
|
+
"gitHead": "2c8a783542ace3292649a04490919b515e387b9e"
|
|
32
32
|
}
|