Add a very short delay after opening a buffer for running the linter to get it to run more. Increase the delay when typing a bit to reduce juttering.

This commit is contained in:
w0rp 2016-10-05 09:27:03 +01:00
parent 322ecedf8f
commit 61dad857a5
3 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ vimrc file for all given linters is as follows:
| ------ | ----------- | ------- |
| `g:ale_linters` | a dictionary of linters to whitelist | _not set_ |
| `g:ale_lint_on_text_changed` | lint while typing | `1` |
| `g:ale_lint_delay` | milliseconds to wait before linting | `100` |
| `g:ale_lint_delay` | milliseconds to wait before linting | `200` |
| `g:ale_lint_on_enter` | lint when opening a file | `1` |
| `g:ale_lint_on_save` | lint when saving a file | `0` |
| `g:ale_set_loclist` | set the loclist with errors | `1` |

View File

@ -15,7 +15,7 @@ let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 1)
" execution of a linter when text is changed. The timeout will be set and
" cleared each time text is changed, so repeated edits won't trigger the
" jobs for linting until enough time has passed after editing is done.
let g:ale_lint_delay = get(g:, 'ale_lint_delay', 100)
let g:ale_lint_delay = get(g:, 'ale_lint_delay', 200)
" This flag can be set to 0 to disable linting when the buffer is entered.
let g:ale_lint_on_enter = get(g:, 'ale_lint_on_enter', 1)

View File

@ -350,7 +350,7 @@ endif
if g:ale_lint_on_enter
augroup ALERunOnEnterGroup
autocmd!
autocmd BufEnter * call ALELint(0)
autocmd BufEnter * call ALELint(10)
augroup END
endif