File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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) {
676676 return response ;
677677}
678678
679- function completion ( msg : p . RequestMessage ) {
679+ async function completion ( msg : p . RequestMessage ) {
680680 // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion
681681 let params = msg . params as p . ReferenceParams ;
682682 let filePath = fileURLToPath ( params . textDocument . uri ) ;
683683 let code = getOpenedFileContent ( params . textDocument . uri ) ;
684684 let tmpname = utils . createFileInTempDir ( ) ;
685685 fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
686- let response = utils . runAnalysisCommand (
686+ let response = await utils . runAnalysisCommand (
687687 filePath ,
688688 [
689689 "completion" ,
@@ -1238,7 +1238,7 @@ async function onMessage(msg: p.Message) {
12381238 } else if ( msg . method === p . DocumentSymbolRequest . method ) {
12391239 send ( await documentSymbol ( msg ) ) ;
12401240 } else if ( msg . method === p . CompletionRequest . method ) {
1241- send ( completion ( msg ) ) ;
1241+ send ( await completion ( msg ) ) ;
12421242 } else if ( msg . method === p . CompletionResolveRequest . method ) {
12431243 send ( await completionResolve ( msg ) ) ;
12441244 } else if ( msg . method === p . SemanticTokensRequest . method ) {
You can’t perform that action at this time.
0 commit comments