diff options
Diffstat (limited to 'ale_linters/c')
-rw-r--r-- | ale_linters/c/cquery.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ale_linters/c/cquery.vim b/ale_linters/c/cquery.vim index 225fda57..a20782a2 100644 --- a/ale_linters/c/cquery.vim +++ b/ale_linters/c/cquery.vim @@ -6,9 +6,11 @@ call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#c#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 |