Skip to content
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

Running test for deno, it shows noisy output #776

Open
kyoh86 opened this issue Dec 26, 2023 · 7 comments · Fixed by #777
Open

Running test for deno, it shows noisy output #776

kyoh86 opened this issue Dec 26, 2023 · 7 comments · Fixed by #777

Comments

@kyoh86
Copy link

kyoh86 commented Dec 26, 2023

:TestFile shows the noisy output with including ANSI Escape Codes.
image

How to set envar only for the test?
Setting NO_COLOR=true for envar, deno test says as monochrome.

...It's off the subject, but the help document (doc/test.txt) will not be set filetype=help.
You may put a modeline like below to set it.

vim:tw=78:ts=8:noet:ft=help:norl:
@codeinabox
Copy link
Collaborator

Thank you for reporting this, which strategy were you using?

@kyoh86
Copy link
Author

kyoh86 commented Dec 28, 2023

@codeinabox I was using dispatch and neovim

@codeinabox
Copy link
Collaborator

I've got a PR that fixes this by adding the environment variable NO_COLOR=1 when using Dispatch, as quickfix doesn't support ANSI codes

@codeinabox
Copy link
Collaborator

Reopening this as I had to revert #777 due to #793

@codeinabox codeinabox reopened this Apr 3, 2024
@Geraint
Copy link

Geraint commented Apr 3, 2024

Maybe starting Vim or Neovim like this:

NO_COLOR=1 vim

... would achieve the desired result?

If I run

:Dispatch env

... I see the environment variable.

Alternatively, maybe setting the environment variable in makeprg would do the trick.

@codeinabox
Copy link
Collaborator

So I've discovered the issue with environment variables are that they break compiler auto-detection. One solution might be to explicitly set the compiler eg :Dispatch -compiler=rspec NO_COLOR=true rspec

@codeinabox
Copy link
Collaborator

Thinking about this more, my inclination is to raise a PR on vim-dispatch so by default it sets NO_COLOR=true, given they've stated it doesn't support ANSI escape sequences

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

Successfully merging a pull request may close this issue.

3 participants