Fix #315 Implement the read_buffer option

This commit is contained in:
w0rp
2017-02-09 23:32:57 +00:00
parent 9f8c76b5b9
commit 5de445c041
6 changed files with 262 additions and 29 deletions

View File

@@ -1082,10 +1082,14 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
See the `output_stream` description for more
information.
The Vim buffer being checked for linter will only
be sent to the final command in the chain. Previous
commands in the chain will receive no input from
stdin.
Commands in the chain all behave as if `read_buffer`
is set to `0` by default, except for the last command
in the chain, which uses the value set for
`read_buffer` in the root |Dictionary|. Each command
in the chain can also provide a `read_buffer` key
to override these values.
See the `read_buffer` description for more
information.
`output_stream` A |String| for the output stream the lines of output
should be read from for the command which is run. The
@@ -1096,6 +1100,12 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
instead of stdout. The option `'both'` will read
from both stder and stdout at the same time.
`read_buffer` A |Number| (`0` or `1`) indicating whether a command
should read the Vim buffer as input via stdin. This
option is set to `1` by default, and can be disabled
if a command manually reads from a temporary file
instead, etc.
Only one of `command`, `command_callback`, or `command_chain` should be
specified. `command_callback` is generally recommended when a command string
needs to be generated dynamically, or any global options are used.