From 6f6d35c0bdc1abea8639e7b32e677513034bb1ee Mon Sep 17 00:00:00 2001 From: fenuks Date: Wed, 18 Apr 2018 01:59:16 +0200 Subject: [PATCH] Add information that ALEFix can now accept arguments --- autoload/ale/fix.vim | 3 +-- doc/ale.txt | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 066ae1a..03855ef 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -356,8 +356,7 @@ function! s:RunFixer(options) abort call ale#fix#ApplyFixes(l:buffer, l:input) endfunction -function! s:GetCallbacks(linters) abort -function! s:GetCallbacks(buffer) abort +function! s:GetCallbacks(buffer, linters) abort if len(a:linters) let l:callback_list = a:linters elseif type(get(b:, 'ale_fixers')) is type([]) diff --git a/doc/ale.txt b/doc/ale.txt index 0757101..5931311 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -473,10 +473,12 @@ ftplugin files for different filetypes. =============================================================================== 4. Fixing Problems *ale-fix* -ALE can fix problems with files with the |ALEFix| command. When |ALEFix| is -run, the variable |g:ale_fixers| will be read for getting a |List| of commands -for filetypes, split on `.`, and the functions named in |g:ale_fixers| will be -executed for fixing the errors. +ALE can fix problems with files with the |ALEFix| command. |ALEFix| +accepts names of fixers to be applied as arguments. Alternatively, +when no arguments are provided, the variable |g:ale_fixers| will be +read for getting a |List| of commands for filetypes, split on `.`, and +the functions named in |g:ale_fixers| will be executed for fixing the +errors. The |ALEFixSuggest| command can be used to suggest tools that be used to fix problems for the current buffer.