diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index 2bfa1ab4..0e93c3eb 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -19,9 +19,16 @@ if !executable("sass") finish endif +"use compass imports if available +let g:syntastic_sass_imports = "" +if executable("compass") + let g:syntastic_sass_imports = system("compass imports") +endif + function! SyntaxCheckers_sass_GetLocList() - let makeprg='sass --check '.shellescape(expand('%')) - let errorformat = '%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' + let makeprg='sass '.g:syntastic_sass_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 }) let bn = bufnr("")