@volar/language-service 2.2.0-alpha.9 → 2.2.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.
|
@@ -16,4 +16,4 @@ export declare const errorMarkups: Record<string, {
|
|
|
16
16
|
error: vscode.Diagnostic;
|
|
17
17
|
markup: vscode.MarkupContent;
|
|
18
18
|
}[]>;
|
|
19
|
-
export declare function register(context: ServiceContext): (uri: string, token?: vscode.CancellationToken, response?: (
|
|
19
|
+
export declare function register(context: ServiceContext): (uri: string, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>;
|
|
@@ -46,7 +46,7 @@ function register(context) {
|
|
|
46
46
|
try {
|
|
47
47
|
const originalDocument = document;
|
|
48
48
|
let tempSourceSnapshot = sourceScript.snapshot;
|
|
49
|
-
let tempVirtualFile = context.language.scripts.set(sourceScript.id + '.tmp', sourceScript.
|
|
49
|
+
let tempVirtualFile = context.language.scripts.set(sourceScript.id + '.tmp', sourceScript.snapshot, sourceScript.languageId, [sourceScript.generated.languagePlugin])?.generated?.root;
|
|
50
50
|
if (!tempVirtualFile) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -96,7 +96,7 @@ function register(context) {
|
|
|
96
96
|
const newText = vscode_languageserver_textdocument_1.TextDocument.applyEdits(document, edits);
|
|
97
97
|
document = vscode_languageserver_textdocument_1.TextDocument.create(document.uri, document.languageId, document.version + 1, newText);
|
|
98
98
|
tempSourceSnapshot = (0, common_1.stringToSnapshot)(newText);
|
|
99
|
-
tempVirtualFile = context.language.scripts.set(sourceScript.id + '.tmp', sourceScript.languageId,
|
|
99
|
+
tempVirtualFile = context.language.scripts.set(sourceScript.id + '.tmp', tempSourceSnapshot, sourceScript.languageId, [sourceScript.generated.languagePlugin])?.generated?.root;
|
|
100
100
|
if (!tempVirtualFile) {
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import type { ServiceContext } from '../types';
|
|
3
|
-
export declare function register(context: ServiceContext): (uri: string, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (
|
|
3
|
+
export declare function register(context: ServiceContext): (uri: string, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-service",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"directory": "packages/language-service"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.2.
|
|
15
|
+
"@volar/language-core": "2.2.1",
|
|
16
16
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
17
17
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
18
18
|
"vscode-uri": "^3.0.8"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "629f686bda694077b236a0bcd0304437bb2eabf5"
|
|
21
21
|
}
|