2017-01-07 23:02:17 +08:00
|
|
|
if get(g:, 'spacevim_lint_on_save', 0)
|
2017-04-08 23:41:56 +08:00
|
|
|
augroup Neomake_on_save
|
2017-01-07 23:02:17 +08:00
|
|
|
au!
|
2017-05-15 23:22:54 +08:00
|
|
|
autocmd! BufWritePost * call s:neomake()
|
2017-01-07 23:02:17 +08:00
|
|
|
augroup END
|
|
|
|
endif
|
2017-05-15 23:22:54 +08:00
|
|
|
|
|
|
|
let g:_spacevim_toggle_syntax_flag = 1
|
|
|
|
|
|
|
|
function! s:neomake() abort
|
|
|
|
if g:_spacevim_toggle_syntax_flag == 1
|
|
|
|
Neomake
|
|
|
|
endif
|
|
|
|
endfunction
|
2017-04-08 23:41:56 +08:00
|
|
|
|
2017-04-08 23:54:44 +08:00
|
|
|
if get(g:, 'spacevim_lint_on_the_fly', 0)
|
2017-04-08 23:41:56 +08:00
|
|
|
let g:neomake_tempfile_enabled = 1
|
|
|
|
let g:neomake_open_list = 0
|
|
|
|
augroup Neomake_on_the_fly
|
|
|
|
au!
|
2017-05-15 23:22:54 +08:00
|
|
|
autocmd! TextChangedI * call s:neomake()
|
2017-04-08 23:41:56 +08:00
|
|
|
augroup END
|
|
|
|
endif
|