Hello, I installed the Clangd extension in VSCode, to use for my WSL2. I use cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON and it has finished indexing, and it works for some things. But when I hover over or try to ctrl+click a variable or function, it just shows the namespace which I am in, as in the screenshot (or goes to it for ctrl+click). In the screenshots, by the way, I am in a file myFile_def.hpp and in the namespace MueLu. Clangd is basically just pointing me back to MueLu in the same file.......
Even if the variable is declared in another file, it does not go to that file, it just goes to the top of this file to the namespace. I did everything right, I gave it the compile_commands.json and I have {workspace}/.vscode/settings.json:
{
"cmake.sourceDirectory": "source",
"clangd.serverPath": "/usr/bin/clangd",
"clangd.arguments": [
"--compile-commands-dir=build",
"--query-driver=/usr/bin/clang++,/usr/bin/g++"
]
}
where {workspace} is the base directory in which source and build are located.
Any help is much appreciated, I don't know what is wrong. I don't know if this is the right tag, but hope it's ok.