File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -658,15 +658,15 @@ function askForAllCurrentConfiguration() {
658658 send ( req ) ;
659659}
660660
661- function semanticTokens ( msg : p . RequestMessage ) {
661+ async function semanticTokens ( msg : p . RequestMessage ) {
662662 // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
663663 let params = msg . params as p . SemanticTokensParams ;
664664 let filePath = fileURLToPath ( params . textDocument . uri ) ;
665665 let extension = path . extname ( params . textDocument . uri ) ;
666666 let code = getOpenedFileContent ( params . textDocument . uri ) ;
667667 let tmpname = utils . createFileInTempDir ( extension ) ;
668668 fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
669- let response = utils . runAnalysisCommand (
669+ let response = await utils . runAnalysisCommand (
670670 filePath ,
671671 [ "semanticTokens" , tmpname ] ,
672672 msg ,
@@ -1242,7 +1242,7 @@ async function onMessage(msg: p.Message) {
12421242 } else if ( msg . method === p . CompletionResolveRequest . method ) {
12431243 send ( await completionResolve ( msg ) ) ;
12441244 } else if ( msg . method === p . SemanticTokensRequest . method ) {
1245- send ( semanticTokens ( msg ) ) ;
1245+ send ( await semanticTokens ( msg ) ) ;
12461246 } else if ( msg . method === p . CodeActionRequest . method ) {
12471247 send ( codeAction ( msg ) ) ;
12481248 } else if ( msg . method === p . DocumentFormattingRequest . method ) {
You can’t perform that action at this time.
0 commit comments