@@ -202,7 +202,7 @@ let syncProjectConfigCache = async (rootPath: string) => {
202
202
}
203
203
} ;
204
204
205
- let deleteProjectConfigCache = ( rootPath : string ) => {
205
+ let deleteProjectConfigCache = async ( rootPath : string ) => {
206
206
try {
207
207
if ( debug ) console . log ( "deleting project config cache for " + rootPath ) ;
208
208
await utils . runAnalysisAfterSanityCheck ( rootPath , [ "cache-delete" , rootPath ] ) ;
@@ -350,7 +350,7 @@ let openedFile = async (fileUri: string, fileContent: string) => {
350
350
}
351
351
} ;
352
352
353
- let closedFile = ( fileUri : string ) => {
353
+ let closedFile = async ( fileUri : string ) => {
354
354
let filePath = fileURLToPath ( fileUri ) ;
355
355
356
356
if ( config . extensionConfiguration . incrementalTypechecking ?. enable ) {
@@ -372,7 +372,7 @@ let closedFile = (fileUri: string) => {
372
372
compilerLogsWatcher . unwatch (
373
373
path . join ( projectRootPath , c . buildNinjaPartialPath )
374
374
) ;
375
- deleteProjectConfigCache ( projectRootPath ) ;
375
+ await deleteProjectConfigCache ( projectRootPath ) ;
376
376
deleteProjectDiagnostics ( projectRootPath ) ;
377
377
if ( root . bsbWatcherByEditor !== null ) {
378
378
root . bsbWatcherByEditor . kill ( ) ;
@@ -1078,7 +1078,7 @@ async function onMessage(msg: p.Message) {
1078
1078
}
1079
1079
} else if ( msg . method === DidCloseTextDocumentNotification . method ) {
1080
1080
let params = msg . params as p . DidCloseTextDocumentParams ;
1081
- closedFile ( params . textDocument . uri ) ;
1081
+ await closedFile ( params . textDocument . uri ) ;
1082
1082
} else if ( msg . method === DidChangeConfigurationNotification . type . method ) {
1083
1083
// Can't seem to get this notification to trigger, but if it does this will be here and ensure we're synced up at the server.
1084
1084
askForAllCurrentConfiguration ( ) ;
0 commit comments