From c91952a1c209828d43c288878ad0dfab785ec8ab Mon Sep 17 00:00:00 2001 From: Vitaly Kushner Date: Mon, 8 Aug 2011 11:33:25 +0300 Subject: [PATCH] support local compass configuration for sass --- bundle/syntastic/syntax_checkers/sass.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bundle/syntastic/syntax_checkers/sass.vim b/bundle/syntastic/syntax_checkers/sass.vim index 4eb128b3..5b840923 100644 --- a/bundle/syntastic/syntax_checkers/sass.vim +++ b/bundle/syntastic/syntax_checkers/sass.vim @@ -29,7 +29,13 @@ function! SyntaxCheckers_sass_GetLocList() let g:syntastic_sass_imports = "" endif - let makeprg='sass '.g:syntastic_sass_imports.' --check '.shellescape(expand('%')) + if executable("compass") && filereadable("config/compass.rb") + let local_imports = "--compass" + else + let local_imports = "" + endif + + let makeprg='sass '.g:syntastic_sass_imports.' '.local_imports.' --check '.shellescape(expand('%')) let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%m' let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })