Allow easy disabling of all ALE configs

Set `updatetime` option and `g:ale_lint_on_text_changed` variable in an Vim startup autocommand so that they won't be set when the user disables the `ale` augroup (with something like `silent! augroup! ale` or `augroup \ autocmd! \ augroup END`) in their local vimrc.

This allows users to use ALE with its default linting settings without needing to manually `unlet` the `updatetime` option and `g:ale_lint_on_text_changed` variable also.
This commit is contained in:
RJ Dellecese 2018-11-01 17:06:23 -04:00 committed by Geoff Harcourt
parent a4da3e4523
commit 42c8204e6c

5
vimrc
View file

@ -56,8 +56,9 @@ augroup ale
autocmd! autocmd!
if g:has_async if g:has_async
set updatetime=1000 autocmd VimEnter *
let g:ale_lint_on_text_changed = 0 \ set updatetime=1000 |
\ let g:ale_lint_on_text_changed = 0
autocmd CursorHold * call ale#Queue(0) autocmd CursorHold * call ale#Queue(0)
autocmd CursorHoldI * call ale#Queue(0) autocmd CursorHoldI * call ale#Queue(0)
autocmd InsertEnter * call ale#Queue(0) autocmd InsertEnter * call ale#Queue(0)