make syntastic use the warning section

This commit is contained in:
Bailey Ling
2013-08-06 21:42:32 -04:00
parent 7fb9bcf2c9
commit d2c069b971
4 changed files with 12 additions and 8 deletions

View File

@@ -1,8 +1,12 @@
" MIT license. Copyright (c) 2013 Bailey Ling.
" vim: ts=2 sts=2 sw=2 fdm=indent
function! airline#extensions#syntastic#init(ext)
if g:airline_section_gutter == ''
let g:airline_section_gutter = '%#warningmsg#%{SyntasticStatuslineFlag()}'
function! airline#extensions#syntastic#apply()
if exists('w:airline_active') && w:airline_active
let w:airline_section_warning = ' %#warningmsg#%{SyntasticStatuslineFlag()}'
endif
endfunction
function! airline#extensions#syntastic#init(ext)
call a:ext.add_statusline_funcref(function('airline#extensions#syntastic#apply'))
endfunction