diff options
Diffstat (limited to 'ale_linters/cpp/clangd.vim')
-rw-r--r-- | ale_linters/cpp/clangd.vim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ale_linters/cpp/clangd.vim b/ale_linters/cpp/clangd.vim index 1d716c33..9139f054 100644 --- a/ale_linters/cpp/clangd.vim +++ b/ale_linters/cpp/clangd.vim @@ -6,6 +6,7 @@ call ale#Set('cpp_clangd_options', '') function! ale_linters#cpp#clangd#GetProjectRoot(buffer) abort let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' endfunction |