Skip to content

Commit f0de0d1

Browse files
committed
Make server.typeDefinition async
1 parent 9e9058e commit f0de0d1

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
@@ -529,11 +529,11 @@ async function definition(msg: p.RequestMessage) {
529529
return response;
530530
}
531531

532-
function typeDefinition(msg: p.RequestMessage) {
532+
async function typeDefinition(msg: p.RequestMessage) {
533533
// https://microsoft.github.io/language-server-protocol/specification/specification-current/#textDocument_typeDefinition
534534
let params = msg.params as p.TypeDefinitionParams;
535535
let filePath = fileURLToPath(params.textDocument.uri);
536-
let response = utils.runAnalysisCommand(
536+
let response = await utils.runAnalysisCommand(
537537
filePath,
538538
[
539539
"typeDefinition",
@@ -1228,7 +1228,7 @@ async function onMessage(msg: p.Message) {
12281228
} else if (msg.method === p.DefinitionRequest.method) {
12291229
send(await definition(msg));
12301230
} else if (msg.method === p.TypeDefinitionRequest.method) {
1231-
send(typeDefinition(msg));
1231+
send(await typeDefinition(msg));
12321232
} else if (msg.method === p.ReferencesRequest.method) {
12331233
send(references(msg));
12341234
} else if (msg.method === p.PrepareRenameRequest.method) {

0 commit comments

Comments
 (0)