This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-20
Channels
- # adventofcode (17)
- # announcements (1)
- # aws (1)
- # beginners (102)
- # calva (27)
- # cider (16)
- # clj-commons (34)
- # clj-kondo (33)
- # cljs-dev (5)
- # cljsrn (4)
- # clojure (124)
- # clojure-europe (17)
- # clojure-nl (8)
- # clojure-spec (13)
- # clojure-uk (6)
- # clojurescript (68)
- # datahike (21)
- # datomic (23)
- # emacs (3)
- # fulcro (30)
- # introduce-yourself (6)
- # jobs-discuss (6)
- # lsp (31)
- # nextjournal (3)
- # off-topic (1)
- # other-languages (45)
- # portal (4)
- # re-frame (8)
- # releases (4)
- # shadow-cljs (39)
- # specter (6)
- # tools-build (18)
- # tools-deps (11)
Reading https://docs.cider.mx/cider/1.1/usage/pretty_printing.html it is unclear to me if I should expect (setq cider-print-fn "")
to work with the latest cider. I attempted to use this setting and it appears to not work, as pr is still being used.
that documentation lists possible values for cider-print-fn
. The empty string is not one of them so I’m not sure what you are trying to do
My apologies, my speech-to-text failed there. Setting it to any value listed on that page does not appear to work.
Setting it to an invalid value does not throw an error either.
ah ok. i’d file a bug report then. And probably the easiest way to confirm and demonstration the it does not work would be with the custom version. Because there is a custom var version, i’m not sure how we could really define an invalid value
but a minimal repro in a ticket with a custom printer
(defn custom-printer [value writer options] (.println writer ^String "custom value"))
and set that. Would be pretty conclusive if it worked or notHmm, interesting. (setq cider-print-fn 'true)
does throw an error when attempting to pprint.
Ok, I'll mess with this more. I just wanted a quick sanity check to set my expectations.
what about (setq cider-print-fn "true")
. that might just be a type error on string vs symbol
"true"
succeeds in printing
I would expect that to fail
hmm, default value is "pprint"
, and it's not using pprint by default. Docs say it should be using what's bound to nrepl.middleware.print/*print-fn*
, which is pr
by default.
As mentioned on the ticket - looking at the code you should get some error in the nREPL log, but it will just pick fallback to the default if you supply a function that won't resolve. The printing behavior does change when using the built-in cider-nrepl functions, so it seems to be working.