Add ALEFixPre and ALEFixPost events
To run autocmd before and after every fix cycle. Fixes #623 (`ALELintPre` was added in #1203).
This commit is contained in:
@@ -54,6 +54,8 @@ function! ale#fix#ApplyQueuedFixes() abort
|
||||
let l:should_lint = l:data.changes_made
|
||||
endif
|
||||
|
||||
silent doautocmd <nomodeline> User ALEFixPost
|
||||
|
||||
" If ALE linting is enabled, check for problems with the file again after
|
||||
" fixing problems.
|
||||
if g:ale_enabled
|
||||
@@ -463,6 +465,8 @@ function! ale#fix#Fix(...) abort
|
||||
call ale#fix#RemoveManagedFiles(l:buffer)
|
||||
call ale#fix#InitBufferData(l:buffer, l:fixing_flag)
|
||||
|
||||
silent doautocmd <nomodeline> User ALEFixPre
|
||||
|
||||
call s:RunFixer({
|
||||
\ 'buffer': l:buffer,
|
||||
\ 'input': g:ale_fix_buffer_data[l:buffer].lines_before,
|
||||
|
||||
Reference in New Issue
Block a user