clang_complete
clang_complete copied to clipboard
Added ability to specify paths for options files
I wanted to be able to use out of tree builds with cmake, and not have to worry about copying over the compile_commands.json file. In this branch, you are now able to specify a filename to search for. In my case, I can specify:
let g:clang_auto_user_options = 'compile_commands.json'
let g:clang_compilation_database_search_path = 'build/compile_commands.json'
which will properly find all the header files based on my cmake configurations.
Now the the code isn't exactly perfect. As you can see above, I kept how the clang_auto_user_options worked for backwards compatabilty and decided to add two new global variables for specifying the search path. The other variable is for the .clang_complete search path (g:clang_complete_search_path). Im not sure if changing the path for .clang_complete is as helpful but I figured we should keep the logic the same.
Any update on this? Thanks!
I would prefer if you only add one configuration that specify the search path for both .clang_complete and compile_commands.json. Can you also rebase and squash all of those commits, and test with the autochdir option set?
Thanks, Xavier