From 06f8e8434aeefbf6da8c4c62e6048457e217e3af Mon Sep 17 00:00:00 2001 From: Alexander Huynh Date: Wed, 12 Dec 2018 05:11:59 +0000 Subject: [PATCH] use Syntastic's post-check hook to update lightline --- doc/lightline.txt | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/doc/lightline.txt b/doc/lightline.txt index 6f3f176..7c2a886 100644 --- a/doc/lightline.txt +++ b/doc/lightline.txt @@ -452,13 +452,9 @@ In order to change the syntastic component more outstanding, you have to use \ 'syntastic': 'error', \ } \ } - let g:syntastic_mode_map = { 'mode': 'passive' } - augroup AutoSyntastic - autocmd! - autocmd BufWritePost *.c,*.cpp call s:syntastic() - augroup END - function! s:syntastic() - SyntasticCheck + " Syntastic can call a post-check hook, let's update lightline there + " For more information: :help syntastic-loclist-callback + function! SyntasticCheckHook(errors) call lightline#update() endfunction < @@ -908,12 +904,9 @@ For users who uses lots of plugins: return lightline#statusline(0) endfunction - augroup AutoSyntastic - autocmd! - autocmd BufWritePost *.c,*.cpp call s:syntastic() - augroup END - function! s:syntastic() - SyntasticCheck + " Syntastic can call a post-check hook, let's update lightline there + " For more information: :help syntastic-loclist-callback + function! SyntasticCheckHook(errors) call lightline#update() endfunction