The directory that my compile_commands.json is located in varies per-project, and I would like to be able to set --compile-commands-dir in a per-project VSCode settings.json. The location of compilers varies per-user, and I am currently using the global "clangd.arguments" setting to define the location of my compilers with --query-driver. You cannot have "clangd.arguments" in your project and global settings, as the project settings will override the global settings, thus getting rid of the --query-driver arguments.
To solve this, it would be very helpful if I could define --compile-commands-dir with a separate settings.json entry, therefore enabling us to set the location of compile_commands.json per-project.
Technically, I think it would make sense to append this argument specifically after"clangd.arguments", so that if --compile-commands-dir is already declared in "clangd.arguments", then the project-level --compile-command-dir is supplied last and therefore would be the one clangd uses.
For additional context, please see this discussion in the clangd language server repository.
The directory that my compile_commands.json is located in varies per-project, and I would like to be able to set
--compile-commands-dir
in a per-project VSCodesettings.json
. The location of compilers varies per-user, and I am currently using the global"clangd.arguments"
setting to define the location of my compilers with--query-driver
. You cannot have"clangd.arguments"
in your project and global settings, as the project settings will override the global settings, thus getting rid of the--query-driver
arguments.To solve this, it would be very helpful if I could define
--compile-commands-dir
with a separatesettings.json
entry, therefore enabling us to set the location of compile_commands.json per-project.Technically, I think it would make sense to append this argument specifically after
"clangd.arguments"
, so that if--compile-commands-dir
is already declared in"clangd.arguments"
, then the project-level--compile-command-dir
is supplied last and therefore would be the one clangd uses.For additional context, please see this discussion in the clangd language server repository.