diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-06 23:13:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-06 23:13:53 +0100 |
commit | f30652a98f6c350ca02dde8d43c9eaafb1ac9f18 (patch) | |
tree | b852c4241b3051bf0a6a84f6b9bd16517e258e92 /doc/ale.txt | |
parent | e4d886d4a798208d2c5dd10816cd3f47a8f5f431 (diff) | |
download | ale-f30652a98f6c350ca02dde8d43c9eaafb1ac9f18.zip |
Allow ALEFix functions to be defined with only the buffer argument
Diffstat (limited to 'doc/ale.txt')
-rw-r--r-- | doc/ale.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index 955e3879..dcba2fec 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -770,10 +770,16 @@ The values for `g:ale_fixers` can be a list of |String|, |Funcref|, or |lambda| values. String values must either name a function, or a short name for a function set in the ALE fixer registry. -Each function for fixing errors must accept two arguments `(buffer, lines)`, -representing the buffer being fixed and the lines to fix. The functions must -return either `0`, for changing nothing, a |List| for new lines to set, or a -|Dictionary| for describing a command to be run in the background. +Each function for fixing errors must accept either one argument `(buffer)` or +two arguments `(buffer, lines)`, representing the buffer being fixed and the +lines to fix. The functions must return either `0`, for changing nothing, a +|List| for new lines to set, or a |Dictionary| for describing a command to be +run in the background. + +Functions receiving a variable number of arguments will not receive the second +argument `lines`. Functions should name two arguments if the `lines` argument +is desired. This is required to avoid unnecessary copying of the lines of +the buffers being checked. When a |Dictionary| is returned for an |ALEFix| callback, the following keys are supported for running the commands. |