Skip to content

Commit f187e08

Browse files
committed
Make server.updateDiagnosticSyntax async
1 parent 74178cb commit f187e08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ function format(msg: p.RequestMessage): Array<p.Message> {
836836
}
837837
}
838838

839-
let updateDiagnosticSyntax = (fileUri: string, fileContent: string) => {
839+
let updateDiagnosticSyntax = async (fileUri: string, fileContent: string) => {
840840
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
841841
// The incremental typechecking already sends syntax diagnostics.
842842
return;
@@ -1056,7 +1056,7 @@ async function onMessage(msg: p.Message) {
10561056
} else if (msg.method === DidOpenTextDocumentNotification.method) {
10571057
let params = msg.params as p.DidOpenTextDocumentParams;
10581058
await openedFile(params.textDocument.uri, params.textDocument.text);
1059-
updateDiagnosticSyntax(params.textDocument.uri, params.textDocument.text);
1059+
await updateDiagnosticSyntax(params.textDocument.uri, params.textDocument.text);
10601060
} else if (msg.method === DidChangeTextDocumentNotification.method) {
10611061
let params = msg.params as p.DidChangeTextDocumentParams;
10621062
let extName = path.extname(params.textDocument.uri);
@@ -1070,7 +1070,7 @@ async function onMessage(msg: p.Message) {
10701070
params.textDocument.uri,
10711071
changes[changes.length - 1].text
10721072
);
1073-
updateDiagnosticSyntax(
1073+
await updateDiagnosticSyntax(
10741074
params.textDocument.uri,
10751075
changes[changes.length - 1].text
10761076
);

0 commit comments

Comments
 (0)