@volar/language-server 1.0.0-rc.5 → 1.0.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/utils/snapshots.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ export declare function createSnapshots(connection: vscode.Connection): {
|
|
|
38
38
|
pathHas: (rootUri: shared._2.URI, path: string) => IncrementalScriptSnapshot | undefined;
|
|
39
39
|
pathSet: (rootUri: shared._2.URI, path: string, item: IncrementalScriptSnapshot) => void;
|
|
40
40
|
};
|
|
41
|
-
onDidOpen: (cb: (params: vscode.DidOpenTextDocumentParams) => void) => () => boolean;
|
|
42
41
|
onDidChangeContent: (cb: (params: vscode.DidChangeTextDocumentParams) => void) => () => boolean;
|
|
43
42
|
onDidClose: (cb: (params: vscode.DidCloseTextDocumentParams) => void) => () => boolean;
|
|
44
43
|
};
|
package/out/utils/snapshots.js
CHANGED
|
@@ -144,13 +144,12 @@ function _combineContinuousChangeRanges(a, b) {
|
|
|
144
144
|
}
|
|
145
145
|
function createSnapshots(connection) {
|
|
146
146
|
const snapshots = shared.createUriMap();
|
|
147
|
-
const onDidOpens = new Set();
|
|
148
147
|
const onDidChangeContents = new Set();
|
|
149
148
|
const onDidCloses = new Set();
|
|
150
149
|
connection.onDidOpenTextDocument(params => {
|
|
151
150
|
snapshots.uriSet(params.textDocument.uri, new IncrementalScriptSnapshot(params.textDocument.uri, params.textDocument.languageId, params.textDocument.version, params.textDocument.text));
|
|
152
|
-
for (const cb of
|
|
153
|
-
cb(params);
|
|
151
|
+
for (const cb of onDidChangeContents) {
|
|
152
|
+
cb({ textDocument: params.textDocument, contentChanges: [{ text: params.textDocument.text }] });
|
|
154
153
|
}
|
|
155
154
|
});
|
|
156
155
|
connection.onDidChangeTextDocument(params => {
|
|
@@ -183,10 +182,6 @@ function createSnapshots(connection) {
|
|
|
183
182
|
});
|
|
184
183
|
return {
|
|
185
184
|
data: snapshots,
|
|
186
|
-
onDidOpen: (cb) => {
|
|
187
|
-
onDidOpens.add(cb);
|
|
188
|
-
return () => onDidOpens.delete(cb);
|
|
189
|
-
},
|
|
190
185
|
onDidChangeContent: (cb) => {
|
|
191
186
|
onDidChangeContents.add(cb);
|
|
192
187
|
return () => onDidChangeContents.delete(cb);
|
package/out/utils/workspaces.js
CHANGED
|
@@ -19,12 +19,9 @@ function createWorkspaces(runtimeEnv, plugins, fsHost, configurationHost, ts, ts
|
|
|
19
19
|
let semanticTokensReq = 0;
|
|
20
20
|
let documentUpdatedReq = 0;
|
|
21
21
|
const workspaces = new Map();
|
|
22
|
-
documents.
|
|
22
|
+
documents.onDidChangeContent(params => {
|
|
23
23
|
updateDiagnostics(params.textDocument.uri);
|
|
24
24
|
});
|
|
25
|
-
documents.onDidChangeContent((params) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
updateDiagnostics(params.textDocument.uri);
|
|
27
|
-
}));
|
|
28
25
|
documents.onDidClose(params => {
|
|
29
26
|
connection.sendDiagnostics({ uri: params.textDocument.uri, diagnostics: [] });
|
|
30
27
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
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.
|
|
21
|
-
"@volar/language-service": "1.0.
|
|
22
|
-
"@volar/shared": "1.0.
|
|
20
|
+
"@volar/language-core": "1.0.1",
|
|
21
|
+
"@volar/language-service": "1.0.1",
|
|
22
|
+
"@volar/shared": "1.0.1",
|
|
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": "
|
|
31
|
+
"gitHead": "62a5dce528c505fcadb609fb391ad7f3f8302fb2"
|
|
32
32
|
}
|