diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -327,6 +327,14 @@ init(1000), }; +opt RenameFileLimit{ + "rename-file-limit", + cat(Features), + desc("Limit the number of files to be affected by symbol renaming. " + "0 means no limit (default=50)"), + init(50), +}; + list TweakList{ "tweaks", cat(Features), @@ -891,6 +899,7 @@ Opts.BackgroundIndex = EnableBackgroundIndex; Opts.BackgroundIndexPriority = BackgroundIndexPriority; Opts.ReferencesLimit = ReferencesLimit; + Opts.Rename.LimitFiles = RenameFileLimit; auto PAI = createProjectAwareIndex(loadExternalIndex, Sync); if (StaticIdx) { IdxStack.emplace_back(std::move(StaticIdx));