Fix #75 - Explain that you need to update NeoVim in the plugin itself.

This commit is contained in:
w0rp 2016-10-10 13:16:32 +01:00
parent d022a867b4
commit 7acfa72c0d
3 changed files with 12 additions and 5 deletions

View File

@ -8,6 +8,13 @@ endif
let g:loaded_ale_flags = 1
" A flag for detecting if the required features are set.
if has('nvim')
let g:ale_has_required_features = has('timers')
else
let g:ale_has_required_features = has('timers') && has('job') && has('channel')
endif
" This flag can be set to 0 to disable linting when text is changed.
let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 1)
@ -45,7 +52,7 @@ let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0)
" * The 1st element is for errors
" * The 2nd element is for warnings
" * The 3rd element is when there are no errors
let g:ale_statusline_format = get(g:, 'ale_statusline_format',
let g:ale_statusline_format = get(g:, 'ale_statusline_format',
\ ['%d error(s)', '%d warning(s)', 'OK']
\)

View File

@ -117,7 +117,7 @@ function! ale#cursor#EchoCursorWarningWithDelay()
let s:cursor_timer = timer_start(10, function('ale#cursor#EchoCursorWarning'))
endfunction
if g:ale_echo_cursor
if g:ale_has_required_features && g:ale_echo_cursor
augroup ALECursorGroup
autocmd!
autocmd CursorMoved,CursorHold * call ale#cursor#EchoCursorWarningWithDelay()

View File

@ -407,9 +407,9 @@ endfunction
" Load all of the linters for each filetype.
runtime! ale_linters/*/*.vim
if !has('nvim') && !(has('timers') && has('job') && has('channel'))
echoerr 'ALE requires NeoVim or Vim 8 with +timers +job +channel'
echoerr 'ALE will not be run automatically'
if !g:ale_has_required_features
echoerr 'ALE requires NeoVim >= 0.1.5 or Vim 8 with +timers +job +channel'
echoerr 'Please update your editor appropriately.'
finish
endif