File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -676,14 +676,14 @@ async function semanticTokens(msg: p.RequestMessage) {
676
676
return response ;
677
677
}
678
678
679
- function completion ( msg : p . RequestMessage ) {
679
+ async function completion ( msg : p . RequestMessage ) {
680
680
// https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion
681
681
let params = msg . params as p . ReferenceParams ;
682
682
let filePath = fileURLToPath ( params . textDocument . uri ) ;
683
683
let code = getOpenedFileContent ( params . textDocument . uri ) ;
684
684
let tmpname = utils . createFileInTempDir ( ) ;
685
685
fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
686
- let response = utils . runAnalysisCommand (
686
+ let response = await utils . runAnalysisCommand (
687
687
filePath ,
688
688
[
689
689
"completion" ,
@@ -1238,7 +1238,7 @@ async function onMessage(msg: p.Message) {
1238
1238
} else if ( msg . method === p . DocumentSymbolRequest . method ) {
1239
1239
send ( await documentSymbol ( msg ) ) ;
1240
1240
} else if ( msg . method === p . CompletionRequest . method ) {
1241
- send ( completion ( msg ) ) ;
1241
+ send ( await completion ( msg ) ) ;
1242
1242
} else if ( msg . method === p . CompletionResolveRequest . method ) {
1243
1243
send ( await completionResolve ( msg ) ) ;
1244
1244
} else if ( msg . method === p . SemanticTokensRequest . method ) {
You can’t perform that action at this time.
0 commit comments