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 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. " 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) let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 1)

View File

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

View File

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