This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-22
Channels
- # announcements (4)
- # babashka (10)
- # beginners (25)
- # biff (4)
- # calva (22)
- # clj-on-windows (3)
- # clj-otel (1)
- # clojure (17)
- # clojure-europe (5)
- # clojure-gamedev (2)
- # clojure-norway (1)
- # clojurescript (21)
- # conjure (5)
- # core-async (3)
- # defnpodcast (1)
- # deps-new (8)
- # events (3)
- # graalvm (10)
- # graphql (4)
- # gratitude (2)
- # hyperfiddle (7)
- # introduce-yourself (4)
- # jobs (1)
- # membrane (9)
- # pedestal (5)
- # quil (2)
- # re-frame (7)
- # releases (2)
- # rewrite-clj (14)
- # shadow-cljs (8)
- # tools-deps (5)
I'm trying to get print_function to work when connected to a babashka repl. In my init.vim I have let g:conjure#client#clojure#nrepl#eval#print_function="user/zprint-pprint"
.
Then I evaluate:
(defn zprint-pprint
"An nrepl-friendly wrapper."
([value writer]
(zprint-pprint value writer {}))
([value writer options]
(binding [*out* writer]
(zprint.core/zprint value {}))))
(do
(create-ns 'user)
(intern 'user 'zprint-pprint))
This works with my lein and clj-cli setups. Not sure what I'm missingIt's a key I pass along with each eval, if you turn on g:conjure#debug and see the key in the log then there's not much else I can do. I think it'll be a think babashka would have to add support for. Either that or you need to load zprint with require manually before the nREPL server tries to use it?