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 @@ -622,15 +622,15 @@ async function rename(msg: p.RequestMessage) {
622
622
return response ;
623
623
}
624
624
625
- function documentSymbol ( msg : p . RequestMessage ) {
625
+ async function documentSymbol ( msg : p . RequestMessage ) {
626
626
// https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
627
627
let params = msg . params as p . DocumentSymbolParams ;
628
628
let filePath = fileURLToPath ( params . textDocument . uri ) ;
629
629
let extension = path . extname ( params . textDocument . uri ) ;
630
630
let code = getOpenedFileContent ( params . textDocument . uri ) ;
631
631
let tmpname = utils . createFileInTempDir ( extension ) ;
632
632
fs . writeFileSync ( tmpname , code , { encoding : "utf-8" } ) ;
633
- let response = utils . runAnalysisCommand (
633
+ let response = await utils . runAnalysisCommand (
634
634
filePath ,
635
635
[ "documentSymbol" , tmpname ] ,
636
636
msg ,
@@ -1236,7 +1236,7 @@ async function onMessage(msg: p.Message) {
1236
1236
} else if ( msg . method === p . RenameRequest . method ) {
1237
1237
send ( await rename ( msg ) ) ;
1238
1238
} else if ( msg . method === p . DocumentSymbolRequest . method ) {
1239
- send ( documentSymbol ( msg ) ) ;
1239
+ send ( await documentSymbol ( msg ) ) ;
1240
1240
} else if ( msg . method === p . CompletionRequest . method ) {
1241
1241
send ( completion ( msg ) ) ;
1242
1242
} else if ( msg . method === p . CompletionResolveRequest . method ) {
You can’t perform that action at this time.
0 commit comments