diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -218,6 +218,7 @@ BGOpts.ContextProvider = [this](PathRef P) { return createProcessingContext(P); }; + BGOpts.CollectMainFileRefs = Opts.CollectMainFileRefs; BackgroundIdx = std::make_unique( TFS, CDB, BackgroundIndexStorage::createDiskBackedStorageFactory(