vscode-clangd
vscode-clangd copied to clipboard
Go to symbol only shows current file
The function go to symbol only shows symbols in the current file. Is there no way to search through all symbols in the project?
Using clangd 11.0.1-2.
VSCode has a "Go to symbol in editor" command and a "Go to symbol in workspace" command. The latter should offer symbols from the whole project, assuming the project is indexed.
Thanks! But realized this issue was caused by clangd not picking up the right compilation database. Seems it defaults to reading it from the source directory. Is that configurable?
Yes, using the --compile-commands-dir command line argument to clangd (discussed e.g. here).