Skip to content

Commit

Permalink
Merge pull request #338 from ahrex/ahlex/syntastic-doc
Browse files Browse the repository at this point in the history
use Syntastic's post-check hook to update lightline
  • Loading branch information
itchyny committed Dec 12, 2018
2 parents 688240e + 06f8e84 commit 1ef44bf
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions doc/lightline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ef44bf

Please sign in to comment.