Closed fcying closed 6 years ago
I would prefer to add a g:ncm2_pyclang#database_path
like option
For example:
let g:ncm2_pyclang#args_file_path = [".clang_complete"]
Then you could customize it as
let g:ncm2_pyclang#args_file_path = [".clang_complete", ".svn/.clang_complete", ".git/clang_complete", ...]
If found config in scm_dir, the run_dir
is set to the project root, not set to the file dir, so I have to identify scm_dir.
Can I add a option to search form scm_dir?
let g:ncm2_pyclang#args_file_search_scm = ['.git', '.svn']
or identify which dir is scm:
let g:ncm2_pyclang#scm_dirs = ['.git', '.svn']
let g:ncm2_pyclang#args_file_path = [".clang_complete", ".svn/.clang_complete", ".git/clang_complete", ...]
@fcying There is an option g:ncm2_pyclang#args_file_path
existed, maybe it's a good choice to extend it directly.
It can work fine with .git/.clang_complete
, thanks~
a little problem: if use abs path, the isfile check can't work fine.
p = join(d, name)
if isfile(p):
if isabs(name):
return p, dirname(name)
else:
return p, d
call isabs at first?
if isabs(name):
if isfile(name):
return name, dirname(name)
else:
p = join(d, name)
if isfile(p):
return p, d
isabs is removed in latest version.
it doesn't seem to be needed
I thought it was added to support abspath, then there is no problem.
Some projects are not convenient to add
.clang_complete
to the root directory, so add scm dir to the search path.