[clang-tools-extra] Add --project-root to clangd (PR #155905)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 22 17:52:04 PST 2025
HighCommander4 wrote:
Thanks for the clarification.
I have a couple of follow-up questions about using clangd with Zed, with a view to understanding what sort of constraints we have on how to configure this behaviour:
1. Does Zed send a suitable workspace path in [`InitializeParams`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeParams), in any of the `rootPath`, `rootUri`, or `workspaceFolders` fields? (If unsure, feel free to post [clangd logs](https://clangd.llvm.org/troubleshooting.html#gathering-logs) taken with `--log=verbose`, which will include the entire contents of the client's `initialize` request.) I'm trying to understand whether we have the potential option of using this directory, rather than specifying an additional (possibly conflicting) directory as the value of a command-line argument such as `--project-root`.
2. Does Zed provide some way of customizing the `initialize` request, such as injecting additional fields into it? (E.g. neovim allows this, with a short piece of Lua script.) If it does, and the way to activate this feature would be to inject e.g. `strongWorkspaceMode: true` or some such, would you consider that a sufficiently usable alternative to a command line option?
https://github.com/llvm/llvm-project/pull/155905
More information about the cfe-commits
mailing list