@@ -67,10 +67,11 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
67
67
UpdateIndexCallbacks (FileIndex *FIndex,
68
68
ClangdServer::Callbacks *ServerCallbacks,
69
69
const ThreadsafeFS &TFS, AsyncTaskRunner *Tasks,
70
- bool CollectInactiveRegions)
70
+ bool CollectInactiveRegions,
71
+ const ClangdServer::Options &Opts)
71
72
: FIndex(FIndex), ServerCallbacks(ServerCallbacks),
72
73
TFS (TFS), Stdlib{std::make_shared<StdLibSet>()}, Tasks(Tasks),
73
- CollectInactiveRegions (CollectInactiveRegions) {}
74
+ CollectInactiveRegions (CollectInactiveRegions), Opts(Opts) {}
74
75
75
76
void onPreambleAST (
76
77
PathRef Path, llvm::StringRef Version, CapturedASTCtx ASTCtx,
@@ -163,6 +164,7 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
163
164
std::shared_ptr<StdLibSet> Stdlib;
164
165
AsyncTaskRunner *Tasks;
165
166
bool CollectInactiveRegions;
167
+ const ClangdServer::Options &Opts;
166
168
};
167
169
168
170
class DraftStoreFS : public ThreadsafeFS {
@@ -227,7 +229,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
227
229
std::make_unique<UpdateIndexCallbacks>(
228
230
DynamicIdx.get (), Callbacks, TFS,
229
231
IndexTasks ? &*IndexTasks : nullptr ,
230
- PublishInactiveRegions));
232
+ PublishInactiveRegions, Opts ));
231
233
// Adds an index to the stack, at higher priority than existing indexes.
232
234
auto AddIndex = [&](SymbolIndex *Idx) {
233
235
if (this ->Index != nullptr ) {
0 commit comments