This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-26
Channels
- # announcements (6)
- # beginners (69)
- # calva (10)
- # clj-kondo (9)
- # clojure (32)
- # clojure-uk (9)
- # clojuredesign-podcast (13)
- # clojurescript (14)
- # clojureverse-ops (2)
- # conjure (24)
- # cursive (12)
- # data-science (1)
- # datomic (13)
- # graalvm (5)
- # jobs-discuss (4)
- # malli (6)
- # meander (33)
- # off-topic (9)
- # pedestal (2)
- # re-frame (38)
- # reitit (6)
- # rum (4)
- # shadow-cljs (6)
- # tools-deps (8)
- # xtdb (26)
I think it might even be able to figure out that it's inside tmux and use tmux automagically? I remember using vim-jack-in inside tmux and being pleasantly surprised that my REPL opened in a tmux window
Is there a way to configure pretty printing at the moment? At first, I thought conjure was leveraging nrepl-middleware to print to the log buffer, but i haven't been able to do (set! nrepl.middleware.print/*print-fn* zprint.core/zprint)
so perhaps not?
Conjure sends conjure.internal/pprint
to the REPL on connection and sets nrepl.middleware.print/print
for each eval
I don't think you can just set the print-fn to any old fn, I think it has to have a certain signature
:code (.. "(ns conjure.internal"
" (:require [clojure.pprint :as pp]))"
"(defn pprint [val w opts]"
" (apply pp/write val"
" (mapcat identity (assoc opts :stream w))))")}
hm. I was following the example here https://nrepl.org/nrepl/usage/misc.html#_pretty_printing
Pretty sure if you don't meet that contract it silently fails and just falls through to a default?
it's funny they give an example of setting print-fn
and then afterwards explain the wrapper. sorry if the error is between the keyboard and computer here!
Yeah, maybe the docs could be improved there :thinking_face: I remember being thoroughly confused when I was first implementing the print option at the nREPL message level
I tried using the wrapper, but to no effect. None of the changes seem to affect the log printing
Not really sure what's going on right now but I'm off to cook some dinner, might be worth running it past #cider or #nrepl? I feel like it's more a problem with getting that config exactly right
Oops I accidentally slipped and made it configurable on develop with g:conjure#client#clojure#nrepl#eval#print_function
. Feel free to give that a go!