Open braindevices opened 1 month ago
${workspaceFolder}
should work, its substitution is implemented here.
~
is not supported but looking further up in the same function, ${userHome}
should work as an alternative.
Hmm, but at least it doesn't expand the workspacefolder in my example when I put it in clangd.path
Hmm, but at least it doesn't expand the workspacefolder in my example when I put it in clangd.path
I can't reproduce this, it seems to be expanded fine for me.
Can you provide some more details?
"clangd.path"
setting"clangd.path"
settingclangd.sh
(assuming it's a script)Hmm, but at least it doesn't expand the workspacefolder in my example when I put it in clangd.path
I can't reproduce this, it seems to be expanded fine for me.
Sorry, since I modify the settings too many times for testing, I actually mixed up things.
${workspaceFolder}
works fine, but the Variables scoped per workspace folder ${workspaceFolder:<one of the workspace root folder name>}
does not work.
I have to use ${workspaceFolder:cpp-project}
to identify the path, since clangd only starts in the root1.
{
"folders": [
{
"name": "non-cpp-project",
"path": "../root1"
},
{
"name": "cpp-project",
"path": "../root2"
}
],
"settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python",
"cmake.cmakePath": "${workspaceFolder}/cmake.sh",
"cmake.configureArgs": [
"--fresh"
],
"cmake.useCMakePresets": "always",
"clangd.arguments": [
"--log=verbose",
"--suggest-missing-includes",
"--pretty"
]
}
}
${workspaceFolder}
works fine, but the Variables scoped per workspace folder${workspaceFolder:<one of the workspace root folder name>}
does not work.
Thanks. I revised the issue title to be about this latter case.
Please describe the problem. For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
settings:
It will report cannot find '/path/to/workspace/${workspaceFolder:cpp-project}/clangd.sh' cannot be found. Log file is also missing.
Logs related log:
System information Clangd version (from the log, or
clangd --version
): clangd extension version: clangd version 18.1.3 Operating system: AlmaLinux 9.4 (Seafoam Ocelot)