I am setting up nvim for my work project which is built using empty MetaProject that builds multiple sub-projects and I have issue with clangd. It doesn't recognize custom headers or classes. I know that compile_commands.json
is needed for clang in order to know where to look, but when I build project with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
I won't have that file generated in root directory, but multiple files in multiple sub-projects.
I found compile_commands.json
for my project but how can I can tell clangd this custom path in build directory?
Let's say that path is ${workspaceFolder}/MetaProject/build/1/2/3/compile_commands.json
I am new to nvim and i use NvChad + additionally installed clangd.
I would like to kindly ask you for help because I don't know how to proceed and working without clangd is a pain in the ***. Cheers!