clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
594 stars 97 forks source link

`clangd` binaries suffixed with version number are not automatically found #584

Open adalisk-emikhaylov opened 5 months ago

adalisk-emikhaylov commented 5 months ago

The extension assumes that the Clangd binary is named clangd, but it's often suffixed with version number, e.g. clangd-17.

A very common usecase on Ubuntu is installing the latest Clang+Clangd from https://apt.llvm.org/, which has a suffixed binary.

I suggest that those suffixed binaries should be auto-detected too. I'd suggest talking the binary with the largest suffix number, then comparing --versions against the unsuffixed binary and picking the newer one.

HighCommander4 commented 5 months ago

You're probably aware of this, but just for completeness, you can specify other binary names (and also full paths) using "clangd.path".