diff options
author | Martin Tournoij <martin@arp242.net> | 2017-12-23 13:13:55 +0000 |
---|---|---|
committer | Martin Tournoij <martin@arp242.net> | 2018-03-17 18:24:38 +0000 |
commit | 302f69e933b85628c688a1b16eab5dd2e7976e99 (patch) | |
tree | e27cb56d84dbe449fff9e3514c87e600feecf849 /autoload | |
parent | 92e6e4d1ba482a4d2d89d850f660c67ccf8a28eb (diff) | |
download | ale-302f69e933b85628c688a1b16eab5dd2e7976e99.zip |
Add ALEFixPre and ALEFixPost events
To run autocmd before and after every fix cycle.
Fixes #623 (`ALELintPre` was added in #1203).
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/fix.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 9111db3d..398f57d0 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -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, |