Skip to content

How to make asyncrun use Elixir exunit compiler to display failures like in Dispatch? #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jmgarnier opened this issue Feb 7, 2017 · 2 comments

Comments

@jmgarnier
Copy link

First, I wanted to say thank you for work. I have the feeling asyncrun will be a plugin I will use a lot. Kudos for neovim support 😄 .

I have read your FAQ about how to process the content in quickfix but I am not sure how to tell asyncrun to use the exunit compiler.

Screenshot:
image

See elixir-editors/vim-elixir#76 explains how it was fixed with vim-test + Dispatch.

a screenshot with Dispatch:
image

I am also wondering how Tim Pope does to have some syntax highlighting in color here but that's for another issue

@skywind3000
Copy link
Owner

skywind3000 commented Feb 10, 2017

Multi-line error output is just broken in vim, I agree that.

Not familiar with elixir, so it takes me time to understand what the problem is .
After comparing two screenshots, it seems that exunit is using the local value of errorformat, instead of global value.

asyncrun uses caddexpr to populate the quickfix list. caddexpr only works with global value of errorformat, but exunit may set the local value of errorformat instead of global value.

why can't caddexpr use local errorformat value ?
see vim/vim#569

currently, there is nothing I can do to fix the behavior of caddexpr , but you can change your global errorformat settings by:

:set &g:errorformat = &l:errorformat

Rust/Cargo also get the same problem, which has been disucssed and solved here: #16

@skywind3000
Copy link
Owner

skywind3000 commented Feb 10, 2017

You can see the syntax highlight if the error output of exunit is correctly matched by errorformat in quickfix window:

![asyncrun-highlight]asyncrun-highlight

See line 4-6 in quickfix window

btw, Cargo + Rustc can change the output format from multi-line mode to single line mode (just like gcc), which is more friendly to vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants