mirror of
https://github.com/dense-analysis/ale.git
synced 2026-11-01 01:56:18 +08:00
ccls: Detect build dir and set compilationDatabaseDirectory
Fixes #2621
This commit is contained in:
1 parent
82f734a7c2
commit
4fbfcc9dec
8 files changed
+73
-3
No files matched your search
@@ -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