#857 - Add b:ale_fix_on_save for controlling fixing on save for specific buffers

This commit is contained in:
w0rp
2017-10-30 22:19:57 +00:00
parent 1575b3d7dd
commit 50f7ad3552
7 changed files with 58 additions and 37 deletions

View File

@@ -49,9 +49,7 @@ function! ale#toggle#InitAuGroups() abort
augroup ALERunOnSaveGroup
autocmd!
if (g:ale_enabled && g:ale_lint_on_save) || g:ale_fix_on_save
autocmd BufWritePost * call ale#events#SaveEvent(str2nr(expand('<abuf>')))
endif
autocmd BufWritePost * call ale#events#SaveEvent(str2nr(expand('<abuf>')))
augroup END
augroup ALERunOnInsertLeave
@@ -73,10 +71,6 @@ function! ale#toggle#InitAuGroups() abort
augroup END
if !g:ale_enabled
if !g:ale_fix_on_save
augroup! ALERunOnSaveGroup
endif
augroup! ALEPatternOptionsGroup
augroup! ALERunOnTextChangedGroup
augroup! ALERunOnEnterGroup