diff options
Diffstat (limited to 'ale_linters/cpp/cquery.vim')
-rw-r--r-- | ale_linters/cpp/cquery.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ale_linters/cpp/cquery.vim b/ale_linters/cpp/cquery.vim index 39eebce3..b1c81989 100644 --- a/ale_linters/cpp/cquery.vim +++ b/ale_linters/cpp/cquery.vim @@ -7,6 +7,10 @@ call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + if empty(l:project_root) + let l:project_root = ale#path#FindNearestFile(a:buffer, '.cquery') + endif + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' endfunction |