summaryrefslogtreecommitdiff
path: root/ale_linters/objcpp/clangd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/objcpp/clangd.vim')
-rw-r--r--ale_linters/objcpp/clangd.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/ale_linters/objcpp/clangd.vim b/ale_linters/objcpp/clangd.vim
index 7e06796f..a09753be 100644
--- a/ale_linters/objcpp/clangd.vim
+++ b/ale_linters/objcpp/clangd.vim
@@ -6,6 +6,7 @@ call ale#Set('objcpp_clangd_options', '')
function! ale_linters#objcpp#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