@volar/language-server 1.2.0-alpha.8 → 1.3.0-alpha.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/common/documents.js +6 -0
- package/out/common/features/customFeatures.js +9 -8
- package/out/common/features/languageFeatures.d.ts +3 -2
- package/out/common/features/languageFeatures.js +65 -44
- package/out/common/project.d.ts +8 -8
- package/out/common/project.js +3 -3
- package/out/common/server.js +1 -1
- package/out/common/utils/registerFeatures.js +9 -9
- package/out/common/workspace.d.ts +72 -72
- package/out/common/workspaces.d.ts +88 -88
- package/out/common/workspaces.js +2 -11
- package/out/protocol.d.ts +5 -3
- package/out/types.d.ts +8 -2
- package/package.json +10 -10
package/out/common/workspaces.js
CHANGED
|
@@ -130,18 +130,9 @@ function createWorkspaces(context) {
|
|
|
130
130
|
return;
|
|
131
131
|
const languageService = project.getLanguageService();
|
|
132
132
|
const errors = yield languageService.doValidation(uri, cancel, result => {
|
|
133
|
-
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result
|
|
133
|
+
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result, version });
|
|
134
134
|
});
|
|
135
|
-
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors
|
|
136
|
-
function addVersion(error) {
|
|
137
|
-
if (error.data === undefined) {
|
|
138
|
-
error.data = { version };
|
|
139
|
-
}
|
|
140
|
-
else if (typeof error.data === 'object') {
|
|
141
|
-
error.data.version = version;
|
|
142
|
-
}
|
|
143
|
-
return error;
|
|
144
|
-
}
|
|
135
|
+
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors, version });
|
|
145
136
|
});
|
|
146
137
|
}
|
|
147
138
|
function getProjectAndTsConfig(uri) {
|
package/out/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import type * as html from 'vscode-html-languageservice';
|
|
3
|
-
import type { FileRangeCapabilities } from '@volar/language-core';
|
|
3
|
+
import type { FileKind, FileRangeCapabilities } from '@volar/language-core';
|
|
4
4
|
/**
|
|
5
5
|
* Server request client
|
|
6
6
|
*/
|
|
@@ -60,10 +60,12 @@ export declare namespace ReloadProjectNotification {
|
|
|
60
60
|
const type: vscode.NotificationType<vscode.TextDocumentIdentifier>;
|
|
61
61
|
}
|
|
62
62
|
export declare namespace GetVirtualFileNamesRequest {
|
|
63
|
-
type ParamsType = vscode.TextDocumentIdentifier
|
|
63
|
+
type ParamsType = vscode.TextDocumentIdentifier & {
|
|
64
|
+
fileKinds?: FileKind[];
|
|
65
|
+
};
|
|
64
66
|
type ResponseType = string[];
|
|
65
67
|
type ErrorType = never;
|
|
66
|
-
const type: vscode.RequestType<
|
|
68
|
+
const type: vscode.RequestType<ParamsType, ResponseType, never>;
|
|
67
69
|
}
|
|
68
70
|
export declare namespace GetVirtualFileRequest {
|
|
69
71
|
type ParamsType = {
|
package/out/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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 { Config,
|
|
8
|
+
import { Config, LanguageServicePluginContext } from '@volar/language-service';
|
|
9
9
|
import { ProjectContext } from './common/project';
|
|
10
10
|
export type FileSystemHost = {
|
|
11
11
|
ready(connection: vscode.Connection): void;
|
|
@@ -29,7 +29,7 @@ export interface RuntimeEnvironment {
|
|
|
29
29
|
}
|
|
30
30
|
export interface LanguageServiceContext {
|
|
31
31
|
project: ProjectContext;
|
|
32
|
-
env:
|
|
32
|
+
env: LanguageServicePluginContext['env'];
|
|
33
33
|
host: embedded.LanguageServiceHost;
|
|
34
34
|
sys: FileSystem;
|
|
35
35
|
}
|
|
@@ -63,6 +63,12 @@ export interface LanguageServerInitializationOptions {
|
|
|
63
63
|
serverMode?: ServerMode;
|
|
64
64
|
diagnosticModel?: DiagnosticModel;
|
|
65
65
|
textDocumentSync?: vscode.TextDocumentSyncKind | number;
|
|
66
|
+
/**
|
|
67
|
+
* For better JSON parsing performance language server will filter CompletionList.
|
|
68
|
+
*
|
|
69
|
+
* Enable this option if you want to get complete CompletionList in language client.
|
|
70
|
+
*/
|
|
71
|
+
fullCompletionList?: boolean;
|
|
66
72
|
ignoreTriggerCharacters?: string[];
|
|
67
73
|
/**
|
|
68
74
|
* https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29#cancellation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-alpha.0",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"directory": "packages/language-server"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/language-core": "1.
|
|
21
|
-
"@volar/language-service": "1.
|
|
22
|
-
"@volar/shared": "1.
|
|
23
|
-
"@vscode/l10n": "^0.0.
|
|
24
|
-
"request-light": "^0.
|
|
20
|
+
"@volar/language-core": "1.3.0-alpha.0",
|
|
21
|
+
"@volar/language-service": "1.3.0-alpha.0",
|
|
22
|
+
"@volar/shared": "1.3.0-alpha.0",
|
|
23
|
+
"@vscode/l10n": "^0.0.11",
|
|
24
|
+
"request-light": "^0.7.0",
|
|
25
25
|
"typesafe-path": "^0.2.2",
|
|
26
|
-
"vscode-html-languageservice": "^5.0.
|
|
27
|
-
"vscode-languageserver": "^8.0
|
|
28
|
-
"vscode-languageserver-protocol": "^3.17.
|
|
26
|
+
"vscode-html-languageservice": "^5.0.4",
|
|
27
|
+
"vscode-languageserver": "^8.1.0",
|
|
28
|
+
"vscode-languageserver-protocol": "^3.17.3",
|
|
29
29
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
30
30
|
"vscode-uri": "^3.0.7"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "7582403cc521d33f642183a32da44fb1f64e65ef"
|
|
33
33
|
}
|