First you generate
compile_commands.json
. On Linux bear
does that, on Windows you can somehow parse it from the output of make --debug=print
(or something similar). It contains all compiler flags. Then your C++ plugin should pick it up automatically. Clangd surely does that, and I think the stock C++ plugin too.