skywind3000 / asyncrun.vim

:rocket: Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
https://www.vim.org/scripts/script.php?script_id=5431
MIT License
1.86k stars 111 forks source link

output missing in quickfix error message #232

Closed Konfekt closed 3 years ago

Konfekt commented 3 years ago

When running langtool with

command! -bang -nargs=* Make AsyncRun<bang> -auto=make -program=make <args>

output is missing in the error message: The quickfix list opens and shows

/home/konfekt/test.txt|8 col 8 info| PASSIV_SAETZE[1]

instead of

/home/konfekt/test.txt|8 col 8 info| PASSIV_SAETZE[1] : Passivsatz: Aktiv formulierte Sätze sprechen im Regelfall den Leser stärker an.

The whole error message is only shown after closing and reopening the quickfix list window.

skywind3000 commented 3 years ago

check your errorformat

Konfekt commented 3 years ago

The whole error message is only shown after closing and reopening the quickfix list window.

How could this be related to the error format? Without asyncrun the error messages show up fine.

Konfekt commented 3 years ago

I suspect the issue rather with asyncrun erroneously interpreting the colon : in the error message to filter out what follows it.

tomtomjhj commented 1 year ago

The whole error message is only shown after closing and reopening the quickfix list window.

I'm experiencing a similar issue (with cargo). Have you found a solution?

BTW :cnewer works, too. So I'm adding -post=silent!\ cnewer argument

Konfekt commented 1 year ago

So I'm adding -post=silent!\ cnewer argument

This is a good workaround of the issue at hand; I circumvented it using https://github.com/mg979/tasks.vim

skywind3000 commented 1 year ago

This seems to be caused by multi-line errors incrementally adding into quickfix,

try: adding a -once argument, it will ensure all output will be added to quickfix and matched at once:

command! -bang -nargs=* Make AsyncRun<bang> -once -auto=make -program=make <args>

for more information, visit here

tomtomjhj commented 1 year ago

Thanks, that worked too. So the issue was that multi-line output can't be properly recognized on-the-fly.

Here's an idea: while running, act like -raw so that the user can see the intact output, and at the end, apply efm. Is this possible already or implementable?