clang_complete icon indicating copy to clipboard operation
clang_complete copied to clipboard

Added ability to specify paths for options files

Open muff1nman opened this issue 10 years ago • 2 comments

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.

muff1nman avatar Aug 26 '13 04:08 muff1nman

Any update on this? Thanks!

muff1nman avatar Feb 09 '14 20:02 muff1nman

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

xavierd avatar Feb 15 '14 21:02 xavierd