weavejester / hashp

A better "prn" for debugging
MIT License
439 stars 23 forks source link

How to disable coloring? #4

Open ertugrulcetin opened 4 years ago

ertugrulcetin commented 4 years ago

Is there any config that we change coloring options?

weavejester commented 4 years ago

Not currently, but I'm thinking about how best to add settings like that. Maybe as system properties or environment variables.

ertugrulcetin commented 4 years ago

It would be nice to have those settings. Maybe in .lein/profiles.clj?

agzam commented 3 years ago

I'm too lazy to make and suggest a PR (of course I'm lazy, why would I use Clojure if I wasn't?). Because I'm super lazy, I'm just doing this shit:

(alter-var-root
 #'hashp.core/print-opts
 (constantly (assoc hashp.core/print-opts :print-color false)))
timrobinson33 commented 3 years ago

maybe I'm doing something stupid but the highlighting makes it all but impossible to use in fireplace. Even with @agzam's hack still some escape codes are generated. Or maybe I'm just the only one using vim for clojure?

kovasap commented 2 years ago

I'm using vim too and am having some trouble with this. https://github.com/weavejester/hashp/issues/4#issuecomment-799621441 only seems to work in clj, and i'm using cljs. Curious if anyone else has any workarounds.

borkdude commented 1 year ago

This seems to be a broadly applied convention: https://no-color.org/ Although a dedicated system property may also work since setting environment variables isn't supported in project.clj and deps.edn.

bgalartza commented 1 week ago

Coloring is a problem in Mozilla Firefox too. ANSI colors in the console are not supported, and they completely break the output: image

[1] https://clojurians.slack.com/archives/C03S1KBA2/p1724917601280229 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1720116