From f9c30c3215745354c6fc809cb4fc3db66c2f677c Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Fri, 21 Jun 2013 11:42:14 +0300 Subject: [PATCH] Use default includes only with the C-like checkers. --- autoload/syntastic/c.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/syntastic/c.vim b/autoload/syntastic/c.vim index 10c9f297..a0d2d53d 100644 --- a/autoload/syntastic/c.vim +++ b/autoload/syntastic/c.vim @@ -152,7 +152,9 @@ endfunction function! s:GetIncludeDirs(filetype) let include_dirs = [] - if !exists('g:syntastic_'.a:filetype.'_no_default_include_dirs') || !g:syntastic_{a:filetype}_no_default_include_dirs + if a:filetype =~# '\v^%(c|cpp|d|objc|objcpp)$' && + \ (!exists('g:syntastic_'.a:filetype.'_no_default_include_dirs') || + \ !g:syntastic_{a:filetype}_no_default_include_dirs) let include_dirs = copy(s:default_includes) endif