[clang-tools-extra] Add --project-root to clangd (PR #155905)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 27 22:36:16 PST 2025


================
@@ -500,6 +500,16 @@ opt<bool> EnableConfig{
     init(true),
 };
 
+opt<bool> StrongWorkspaceMode{
+    "strong-workspace-mode",
+    cat(Features),
+    desc("An alternate mode of operation for clangd, operating more closely to "
+         "the workspace.\n"
+         "When enabled, fallback commands use the workspace directory as their "
+         "working directory instead of the parent folder."),
+    init(false),
----------------
HighCommander4 wrote:

Let's make this option hidden for now ([example](https://searchfox.org/llvm/rev/bd95a74a2c548867c004ec991defe276f9cbbf40/clang-tools-extra/clangd/tool/ClangdMain.cpp#134)), until the feature is more fleshed out with other behaviours. (This just means it won't show up in `clangd --help`, only in `clangd --help-hidden`.)

https://github.com/llvm/llvm-project/pull/155905


More information about the cfe-commits mailing list