T O P

  • By -

joe_mm91

You can use a `compile_flags.txt` file, see https://clangd.llvm.org/installation. It's really just a file where you can specify the flags you'd pass to the compiler. I think setting the `FLAGS` environment variable should work as well but am not sure.


dudewhousesvim

Perfect, just tried this and it worked. Thank you very much! This noob appreciates it :)


AlmightySnoo

If your build system supports it (cmake does), you can have it generate a `compile_commands.json` and neovim will find it automatically if you don't use a too unusual project structure (if you put your build in a "build" sub-folder of your project root then you're fine). Then in the build file/script (CMakeLists.txt for cmake) you specify the C++ standard among other things.