mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-12 21:43:50 -05:00
use Syntastic's post-check hook to update lightline
This commit is contained in:
@@ -452,13 +452,9 @@ In order to change the syntastic component more outstanding, you have to use
|
|||||||
\ 'syntastic': 'error',
|
\ 'syntastic': 'error',
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
let g:syntastic_mode_map = { 'mode': 'passive' }
|
" Syntastic can call a post-check hook, let's update lightline there
|
||||||
augroup AutoSyntastic
|
" For more information: :help syntastic-loclist-callback
|
||||||
autocmd!
|
function! SyntasticCheckHook(errors)
|
||||||
autocmd BufWritePost *.c,*.cpp call s:syntastic()
|
|
||||||
augroup END
|
|
||||||
function! s:syntastic()
|
|
||||||
SyntasticCheck
|
|
||||||
call lightline#update()
|
call lightline#update()
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
@@ -908,12 +904,9 @@ For users who uses lots of plugins:
|
|||||||
return lightline#statusline(0)
|
return lightline#statusline(0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
augroup AutoSyntastic
|
" Syntastic can call a post-check hook, let's update lightline there
|
||||||
autocmd!
|
" For more information: :help syntastic-loclist-callback
|
||||||
autocmd BufWritePost *.c,*.cpp call s:syntastic()
|
function! SyntasticCheckHook(errors)
|
||||||
augroup END
|
|
||||||
function! s:syntastic()
|
|
||||||
SyntasticCheck
|
|
||||||
call lightline#update()
|
call lightline#update()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user