diff options
author | w0rp <devw0rp@gmail.com> | 2016-10-07 17:08:11 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-10-07 17:08:11 +0100 |
commit | d97e25a2601d58a1d7e8ae72fb787210f2588a69 (patch) | |
tree | 7a1c3c222fb4a85ace9fad7323f509a3af462f54 /plugin | |
parent | f0f17e4b0d472dd180c6f4b92aa8c28c550d3f7f (diff) | |
download | ale-d97e25a2601d58a1d7e8ae72fb787210f2588a69.zip |
Support reading from both output streams, and fix PHP error parsing, which sometimes logs to stderr, sometimes stdout.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/ale/zmain.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index 83bb8109..8db9d8f7 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -184,6 +184,12 @@ function! s:ApplyLinter(buffer, linter) \ 'on_stderr': 's:GatherOutputNeoVim', \ 'on_exit': 's:HandleExitNeoVim', \}) + elseif a:linter.output_stream ==# 'both' + let a:linter.job = jobstart(command, { + \ 'on_stdout': 's:GatherOutputNeoVim', + \ 'on_stderr': 's:GatherOutputNeoVim', + \ 'on_exit': 's:HandleExitNeoVim', + \}) else let a:linter.job = jobstart(command, { \ 'on_stdout': 's:GatherOutputNeoVim', @@ -202,6 +208,10 @@ function! s:ApplyLinter(buffer, linter) if a:linter.output_stream ==# 'stderr' " Read from stderr instead of stdout. let job_options.err_cb = function('s:GatherOutputVim') + elseif a:linter.output_stream ==# 'both' + " Read from both streams. + let job_options.out_cb = function('s:GatherOutputVim') + let job_options.err_cb = function('s:GatherOutputVim') else let job_options.out_cb = function('s:GatherOutputVim') endif |