This is probably not possible, but I still want to ask. I'm using Clangd as an autocompletion engine for VSCode. It works great, but there is one problem.
The official Windows binaries of Clang rely on MSVC standard library headers. If MSVC is not installed, Clang and Clangd complain about missing headers.
There's a flag that makes Clang use MinGW's libstdc++ (--target=x86_64-w64-windows-gnu), which I have to include in compile_commands.json.
This solution works, but it would be nice to have sensible autocomplete even without compile_commands.json.
Is there a way I can tell Clangd to assume --target=x86_64-w64-windows-gnu if there is no compile_commands.json?
initializationOptions.fallbackFlags), that lets you specify the custom flags. Now I just need some clever way to modify it on the fly..clangdfile? Or VS Codesettings.jsonas"clangd.fallbackFlags": [ "%CLANGD_FALLBACK_FLAGS%" ],? For my purposes I need to parse flags out of acompile_commands.jsonentry and use those as fallback flags.