c syntax_checker: setting to toggle include search

This commit is contained in:
kongo2002 2010-03-26 08:09:10 +08:00 committed by Martin Grenfell
parent b3a0ab8014
commit d4f5aea34d

View File

@ -14,6 +14,11 @@
" (this usually creates a .gch file in your source directory) " (this usually creates a .gch file in your source directory)
" "
" let g:syntastic_c_check_header = 1 " let g:syntastic_c_check_header = 1
"
" to disable the search of included header files after special
" libraries like gtk and glib add this line to your .vimrc:
"
" let g:syntastic_c_no_include_search = 1
if exists('loaded_c_syntax_checker') if exists('loaded_c_syntax_checker')
finish finish
@ -45,7 +50,10 @@ function! SyntaxCheckers_c_GetLocList()
endif endif
endif endif
if !exists('g:syntastic_c_no_include_search') ||
\ g:syntastic_c_no_include_search != 1
let makeprg .= s:SearchHeaders(s:handlers) let makeprg .= s:SearchHeaders(s:handlers)
endif
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
endfunction endfunction