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

Default pretty printer not compatible with cider (and more?) #977

Open
samhedin opened this issue Dec 13, 2023 · 1 comment
Open

Default pretty printer not compatible with cider (and more?) #977

samhedin opened this issue Dec 13, 2023 · 1 comment

Comments

@samhedin
Copy link

samhedin commented Dec 13, 2023

After running (dev/start! {:report (thrower)}) from function schemas I saw this in my emacs *cider-error* buffer:
output
From my understanding, this is because it's using extended ANSI codes. I'm really... not familiar with ANSI codes so I could definitely be wrong here.

I tried to give dev/start! a different -printer with other options for the :colors key, but that didn't help.

Is it because of the hardcoded 5 here?

If so, could it be made an option to only use standard/restricted/whateveryoucallthem ANSI codes?

@dzhus
Copy link

dzhus commented Feb 22, 2024

A workaround for this that simply disables ANSI colour codes is something like

(md/start!
 {:report
  (let [thrower (mdp/thrower)]
    (fn [type data]
      (with-redefs
       [mdv/-color
        (fn [_color body _printer] [:span body])]
        (thrower type data))))})

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