Skip to content

Commit 28226f5

Browse files
committed
Make utils.getReferencesForPosition async
1 parent cbe1239 commit 28226f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ function references(msg: p.RequestMessage) {
550550
// https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
551551
let params = msg.params as p.ReferenceParams;
552552
let filePath = fileURLToPath(params.textDocument.uri);
553-
let result: typeof p.ReferencesRequest.type = utils.getReferencesForPosition(
553+
let result: typeof p.ReferencesRequest.type = await utils.getReferencesForPosition(
554554
filePath,
555555
params.position
556556
);
@@ -567,7 +567,7 @@ function prepareRename(msg: p.RequestMessage): p.ResponseMessage {
567567
// https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_prepareRename
568568
let params = msg.params as p.PrepareRenameParams;
569569
let filePath = fileURLToPath(params.textDocument.uri);
570-
let locations: null | p.Location[] = utils.getReferencesForPosition(
570+
let locations: null | p.Location[] = await utils.getReferencesForPosition(
571571
filePath,
572572
params.position
573573
);

server/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export let runAnalysisCommand = async (
375375
return response;
376376
};
377377

378-
export let getReferencesForPosition = (
378+
export let getReferencesForPosition = async (
379379
filePath: p.DocumentUri,
380380
position: p.Position
381381
) =>

0 commit comments

Comments
 (0)