[clang-tools-extra] [clangd] Use unique command names to fix multi-root workspace support (PR #169734)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 9 17:47:39 PST 2026
HighCommander4 wrote:
> I'd be curious to know whether this is a problem [eclipse-cdt-cloud/vscode-clangd has] also run into
I had a quick look, it looks like they [disable the `executeCommand` feature](https://github.com/eclipse-cdt-cloud/vscode-clangd/blob/4d2f915ddfdd9c598a2e70420d11ce9876a360fa/src/clangd-context.ts#L71-L79) because it "does not support multi-clients at the moment".
I'm inferring from this that they have run into the same issue and would benefit from a solution as well.
And you're right that using unique command names was suggested by a vscode-languageclient maintainer [here](https://github.com/microsoft/vscode-languageserver-node/issues/333#issuecomment-384636904) and seems to have precedent in other language servers, e.g. https://github.com/haskell/haskell-ide-engine/pull/629.
I think that's enough for me to conclude that this is a reasonable approach.
One thought: WDYT about using process ids instead of uuids, as the Haskell LS did in https://github.com/haskell/haskell-ide-engine/pull/632? Some advantages would be that it's shorter, cheaper to compute, and easier to correlate with the server when looking at logs / debugging.
https://github.com/llvm/llvm-project/pull/169734
More information about the cfe-commits
mailing list