Fork me on GitHub
#conjure
<
2022-05-22
>
uwo16:05:09

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 missing

Olical17:05:02

Maybe BB doesn't support that option :thinking_face:

Olical17:05:20

It'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?

uwo17:05:37

Gotcha, thanks!