xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.96k stars 308 forks source link

Completion breaks when opening another .cpp file in a unity build #597

Open rationalcoder opened 1 year ago

rationalcoder commented 1 year ago

I have a main.cpp file in my src directory, and I have others stored in different paths that cannot be compiled independently. When I setup my .clang_complete in the project's root directory, I can get completion to work in main.cpp but not in any other file. I imagine it's just because clang tries to compile the cpp files as-is and doesn't know they are being included in another cpp file.

Is there any way to work around this?