mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-23 01:58:37 +08:00
#2919 Use compile_commands.json for headers
This commit is contained in:
@@ -9,13 +9,6 @@ let s:sep = has('win32') ? '\' : '/'
|
||||
let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt']
|
||||
|
||||
function! ale#c#GetBuildDirectory(buffer) abort
|
||||
" Don't include build directory for header files, as compile_commands.json
|
||||
" files don't consider headers to be translation units, and provide no
|
||||
" commands for compiling header files.
|
||||
if expand('#' . a:buffer) =~# '\v\.(h|hpp)$'
|
||||
return ''
|
||||
endif
|
||||
|
||||
let l:build_dir = ale#Var(a:buffer, 'c_build_dir')
|
||||
|
||||
" c_build_dir has the priority if defined
|
||||
|
||||
Reference in New Issue
Block a user