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 @@ -719,7 +719,7 @@ async function completionResolve(msg: p.RequestMessage) {
719719 return response ;
720720}
721721
722- function codeAction ( msg : p . RequestMessage ) : p . ResponseMessage {
722+ async function codeAction ( msg : p . RequestMessage ) : Promise < p . ResponseMessage > {
723723 let params = msg . params as p . CodeActionParams ;
724724 let filePath = fileURLToPath ( params . textDocument . uri ) ;
725725 let code = getOpenedFileContent ( params . textDocument . uri ) ;
@@ -741,7 +741,7 @@ function codeAction(msg: p.RequestMessage): p.ResponseMessage {
741741 ) ;
742742
743743 fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
744- let response = utils . runAnalysisCommand (
744+ let response = await utils . runAnalysisCommand (
745745 filePath ,
746746 [
747747 "codeAction" ,
@@ -1244,7 +1244,7 @@ async function onMessage(msg: p.Message) {
12441244 } else if ( msg . method === p . SemanticTokensRequest . method ) {
12451245 send ( await semanticTokens ( msg ) ) ;
12461246 } else if ( msg . method === p . CodeActionRequest . method ) {
1247- send ( codeAction ( msg ) ) ;
1247+ send ( await codeAction ( msg ) ) ;
12481248 } else if ( msg . method === p . DocumentFormattingRequest . method ) {
12491249 let responses = format ( msg ) ;
12501250 responses . forEach ( ( response ) => send ( response ) ) ;
You can’t perform that action at this time.
0 commit comments