Merge pull request #58 from epeli/master

SCSS support
This commit is contained in:
Martin Grenfell 2011-08-22 08:25:27 -07:00
commit cf6aa9a414

View File

@ -41,3 +41,24 @@ function! SyntaxCheckers_sass_GetLocList()
return loclist
endfunction
function! SyntaxCheckers_scss_GetLocList()
"use compass imports if available
if g:syntastic_sass_imports == 0 && executable("compass")
let g:syntastic_sass_imports = system("compass imports")
else
let g:syntastic_sass_imports = ""
endif
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("")
for i in loclist
let i['bufnr'] = bn
endfor
return loclist
endfunction