diff options
-rw-r--r-- | doc/ale.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index 62881503..a126f360 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3734,6 +3734,21 @@ ale#fix#registry#Add(name, func, filetypes, desc, [aliases]) ALE will search for fixers in the registry first by `name`, then by their `aliases`. + For example to register a custom fixer for `luafmt`: > + + function! FormatLua(buffer) abort + return { + \ 'command': 'luafmt --stdin' + \} + endfunction + + execute ale#fix#registry#Add('luafmt', 'FormatLua', ['lua'], 'luafmt for lua') + + " You can now use it in g:ale_fixers + let g:ale_fixers = { + \ 'lua': ['luafmt'] + } +< ale#linter#Define(filetype, linter) *ale#linter#Define()* |