Updated ale_linters/c/clangd.vim to match ale_linters/cpp/clangd.vim

This commit is contained in:
Murfalo 2019-10-09 13:30:10 -04:00
parent 618f2d71fc
commit 35f51221f1
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@ call ale#Set('c_clangd_executable', 'clangd')
call ale#Set('c_clangd_options', '') call ale#Set('c_clangd_options', '')
function! ale_linters#c#clangd#GetCommand(buffer) abort function! ale_linters#c#clangd#GetCommand(buffer) abort
return '%e' . ale#Pad(ale#Var(a:buffer, 'c_clangd_options')) let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
return '%e'
\ . ale#Pad(ale#Var(a:buffer, 'c_clangd_options'))
\ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '')
endfunction endfunction
call ale#linter#Define('c', { call ale#linter#Define('c', {