diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2019-10-18 18:15:05 +0200 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2019-10-18 18:15:05 +0200 |
commit | 8239b76c5a4c765ffa04cb5c6ad0ad94cd1d0dea (patch) | |
tree | a06e6d34aad2fea419ae92109fc6319dadda2758 /ale_linters/cpp/clangd.vim | |
parent | 6d5d3fa4dd1cc18a5b90c587502ad37323df08a3 (diff) | |
parent | c06467438dff38b939fd81b32395296d01a59df6 (diff) | |
download | ale-8239b76c5a4c765ffa04cb5c6ad0ad94cd1d0dea.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'ale_linters/cpp/clangd.vim')
-rw-r--r-- | ale_linters/cpp/clangd.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ale_linters/cpp/clangd.vim b/ale_linters/cpp/clangd.vim index fab605f4..14f3fe55 100644 --- a/ale_linters/cpp/clangd.vim +++ b/ale_linters/cpp/clangd.vim @@ -3,9 +3,14 @@ call ale#Set('cpp_clangd_executable', 'clangd') call ale#Set('cpp_clangd_options', '') +call ale#Set('c_build_dir', '') function! ale_linters#cpp#clangd#GetCommand(buffer) abort - return '%e' . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options')) + let l:build_dir = ale#c#GetBuildDirectory(a:buffer) + + return '%e' + \ . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options')) + \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') endfunction call ale#linter#Define('cpp', { |