diff options
author | w0rp <devw0rp@gmail.com> | 2016-10-10 13:16:32 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-10-10 13:16:32 +0100 |
commit | 7acfa72c0df87302a205c4a2d95b2a6a0f119857 (patch) | |
tree | 2624a7a2dae0deb669a83f89e6fad33500d6da68 /plugin | |
parent | d022a867b42d806358e11f55f334884db6535edf (diff) | |
download | ale-7acfa72c0df87302a205c4a2d95b2a6a0f119857.zip |
Fix #75 - Explain that you need to update NeoVim in the plugin itself.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/ale/aaflags.vim | 9 | ||||
-rw-r--r-- | plugin/ale/cursor.vim | 2 | ||||
-rw-r--r-- | plugin/ale/zmain.vim | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/plugin/ale/aaflags.vim b/plugin/ale/aaflags.vim index f18dcc43..56ed4175 100644 --- a/plugin/ale/aaflags.vim +++ b/plugin/ale/aaflags.vim @@ -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'] \) diff --git a/plugin/ale/cursor.vim b/plugin/ale/cursor.vim index 24f1f183..06159714 100644 --- a/plugin/ale/cursor.vim +++ b/plugin/ale/cursor.vim @@ -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() diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index a918f663..117f735c 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -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 |