[PATCH] D136454: [clangd] Make file limit for textDocument/rename configurable
    Christian Kandeler via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Oct 21 07:34:51 PDT 2022
    
    
  
ckandeler created this revision.
ckandeler added a reviewer: kadircet.
Herald added a subscriber: arphaman.
Herald added a project: All.
ckandeler requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Without this, clients are unable to rename often-used symbols in larger
projects.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D136454
Files:
  clang-tools-extra/clangd/tool/ClangdMain.cpp
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp
===================================================================
--- clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -327,6 +327,14 @@
     init(1000),
 };
 
+opt<int> 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<std::string> 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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136454.469607.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221021/11c75510/attachment.bin>
    
    
More information about the cfe-commits
mailing list