From fb6b95a90f5447643886cec8c78e4dd51809b44a Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Tue, 4 Jun 2024 09:06:39 +0200 Subject: [PATCH] conditionally --- server/src/server.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/src/server.ts b/server/src/server.ts index 42e09f42c..2203ce851 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -235,9 +235,13 @@ let compilerLogsWatcher = chokidar }) .on("all", (_e, changedPath) => { if (changedPath.includes("build.ninja")) { - let projectRoot = utils.findProjectRootOfFile(changedPath); - if (projectRoot != null) { - syncProjectConfigCache(projectRoot); + if ( + config.extensionConfiguration.cache?.projectConfig?.enabled === true + ) { + let projectRoot = utils.findProjectRootOfFile(changedPath); + if (projectRoot != null) { + syncProjectConfigCache(projectRoot); + } } } else { sendUpdatedDiagnostics();