mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-07 02:11:05 +08:00
Add options to facilitate linting only in normal mode (#425)
* [#420] Add options to facilitate linting only in normal mode ale_lint_on_text_changed: Allow setting to 'insert' or 'normal' to lint when text is changed only in insert or normal mode respectively. ale_lint_on_insert_leave: This flag can be set to 1 to enable linting when leaving insert mode. * [#420] Test updated global options Ale should - bind to TextChanged events when g:ale_lint_on_text_changed = 1 - bind to TextChanged events when g:ale_lint_on_text_changed = 'always' - bind to InsertLeave event when g:ale_lint_on_insert_leave = 1
This commit is contained in:
10
README.md
10
README.md
@@ -368,7 +368,7 @@ options off.
|
||||
|
||||
```vim
|
||||
" Write this in your vimrc file
|
||||
let g:ale_lint_on_text_changed = 0
|
||||
let g:ale_lint_on_text_changed = 'never'
|
||||
" You can disable this option too
|
||||
" if you don't want linters to run on opening a file
|
||||
let g:ale_lint_on_enter = 0
|
||||
@@ -453,10 +453,10 @@ type, and this delay can be increased so linters are run less often. See
|
||||
`:help g:ale_lint_delay` for more information.
|
||||
|
||||
If you don't wish to run linters while you type, you can disable that
|
||||
behaviour. Set `g:ale_lint_on_text_changed` to `0`. You won't get as frequent
|
||||
error checking, but ALE shouldn't block your ability to edit a document after
|
||||
you save a file, so the asynchronous nature of the plugin will still be an
|
||||
advantage.
|
||||
behaviour. Set `g:ale_lint_on_text_changed` to `never` or `normal`. You won't
|
||||
get as frequent error checking, but ALE shouldn't block your ability to edit a
|
||||
document after you save a file, so the asynchronous nature of the plugin will
|
||||
still be an advantage.
|
||||
|
||||
If you are still concerned, you can turn the automatic linting off altogether,
|
||||
including the option `g:ale_lint_on_enter`, and you can run ALE manually with
|
||||
|
||||
Reference in New Issue
Block a user