diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index f4758414..b67ed238 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -19,6 +19,11 @@ if !executable("sass") finish endif +"By default do not check partials as unknown variables are a syntax error +if !exists("g:syntastic_sass_check_partials") + let g:syntastic_sass_check_partials = 0 +endif + "use compass imports if available let s:imports = "" if executable("compass") @@ -26,6 +31,9 @@ if executable("compass") endif function! SyntaxCheckers_sass_GetLocList() + if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_' + return [] + end let makeprg='sass --no-cache '.s:imports.' --check '.shellescape(expand('%')) let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#' let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'