mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-19 17:42:57 +08:00
ccls: Detect build dir and set compilationDatabaseDirectory
Fixes #2621
This commit is contained in:
@@ -17,3 +17,10 @@ function! ale#handlers#ccls#GetProjectRoot(buffer) abort
|
||||
" Fall back on default project root detection.
|
||||
return ale#c#FindProjectRoot(a:buffer)
|
||||
endfunction
|
||||
|
||||
function! ale#handlers#ccls#GetInitOpts(buffer, init_options_var) abort
|
||||
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
|
||||
let l:init_options = empty(l:build_dir) ? {} : {'compilationDatabaseDirectory': l:build_dir}
|
||||
|
||||
return extend(l:init_options, ale#Var(a:buffer, a:init_options_var))
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user