@@ -202,7 +202,7 @@ let syncProjectConfigCache = async (rootPath: string) => {
202202 }
203203} ;
204204
205- let deleteProjectConfigCache = ( rootPath : string ) => {
205+ let deleteProjectConfigCache = async ( rootPath : string ) => {
206206 try {
207207 if ( debug ) console . log ( "deleting project config cache for " + rootPath ) ;
208208 await utils . runAnalysisAfterSanityCheck ( rootPath , [ "cache-delete" , rootPath ] ) ;
@@ -350,7 +350,7 @@ let openedFile = async (fileUri: string, fileContent: string) => {
350350 }
351351} ;
352352
353- let closedFile = ( fileUri : string ) => {
353+ let closedFile = async ( fileUri : string ) => {
354354 let filePath = fileURLToPath ( fileUri ) ;
355355
356356 if ( config . extensionConfiguration . incrementalTypechecking ?. enable ) {
@@ -372,7 +372,7 @@ let closedFile = (fileUri: string) => {
372372 compilerLogsWatcher . unwatch (
373373 path . join ( projectRootPath , c . buildNinjaPartialPath )
374374 ) ;
375- deleteProjectConfigCache ( projectRootPath ) ;
375+ await deleteProjectConfigCache ( projectRootPath ) ;
376376 deleteProjectDiagnostics ( projectRootPath ) ;
377377 if ( root . bsbWatcherByEditor !== null ) {
378378 root . bsbWatcherByEditor . kill ( ) ;
@@ -1078,7 +1078,7 @@ async function onMessage(msg: p.Message) {
10781078 }
10791079 } else if ( msg . method === DidCloseTextDocumentNotification . method ) {
10801080 let params = msg . params as p . DidCloseTextDocumentParams ;
1081- closedFile ( params . textDocument . uri ) ;
1081+ await closedFile ( params . textDocument . uri ) ;
10821082 } else if ( msg . method === DidChangeConfigurationNotification . type . method ) {
10831083 // 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.
10841084 askForAllCurrentConfiguration ( ) ;
0 commit comments