clangd / vscode-clangd

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

folder setting of clangd.path has no effect #646

Open braindevices opened 3 days ago

braindevices commented 3 days ago

I have this in Folder settings.json

"clangd.path": "/usr/bin/clangd-17"

I complete restart the vscode instance, I also call clangd: restart language server It only works if I put this in user settings or workspace setting.

I understand per each workspace it only start a single clangd instance, thus it only use the first workspace folder as working path, thus the folder setting actually has no effect.

If this is the case, why not just disable the folder setting completely? so far the only setting visible in folder setting window is the clangd.path. I think it should also get removed.

Logs

grep -A2 -B10 "bin/clangd" /tmp/clangd.log

    {
      "pid": 0,
      "ph": "i",
      "name": "Log",
      "ts": 279.94,
      "tid": 22463,
      "args": {
        "Message": "argv[0]: /home/user/.config/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/16.0.2/clangd_16.0.2/bin/clangd"
      }

System information Clangd version (from the log, or clangd --version): clangd extension version: v0.1.28 Operating system: ubuntu 22.04

braindevices commented 3 days ago

it may related to https://github.com/clangd/clangd/issues/1549 i have no idea