This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-11
Channels
- # beginners (79)
- # boot (21)
- # cider (28)
- # cljs-dev (1)
- # clojure (88)
- # clojure-italy (3)
- # clojure-russia (6)
- # clojurescript (49)
- # community-development (4)
- # cursive (37)
- # datomic (12)
- # editors (3)
- # emacs (33)
- # fulcro (15)
- # hoplon (9)
- # jobs-discuss (3)
- # keechma (3)
- # lein-figwheel (2)
- # luminus (3)
- # off-topic (146)
- # onyx (5)
- # portkey (11)
- # re-frame (34)
- # reagent (7)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (6)
- # unrepl (11)
@doglooksgood Why do you want to do this?
emacs lisp debugger do like this, I think it's good. the commands in debugger are all single key command, if I press a wrong key, the buffer will change.
I see your point. We’ve borrowed a lot of the design from Edebug, but I don’t recall how exactly did we came to the current state of affairs. I have some vague memory that in the beginning this was working more or less like edebug, but we ha some reason to change this. @malabarba might remember more and there might also be something in the commit logs.
Hi, does anyone know how to turn off the printing of namespaced maps in the cider repl? I've tried the following hack recommended elsewhere, and it seems inconsistent:
(defmethod print-method clojure.lang.IPersistentMap
[m, ^java.io.Writer w]
(#'clojure.core/print-meta m w)
(#'clojure.core/print-map m #'clojure.core/pr-on w))
Is there a way to configure what bindings the cider repl re-binds? Specifically *print-namespace-maps*
? I find they make the output really difficult to read.i don't believe that CIDER has anything to do with this. it certainly isn't formatting the output once it comes back from the middleware. in a clojure 1.9 project, both lein repl
and CIDER act the same:
{:a/a 1 :a/b 2}
; ==> #:a{:a 1, :b 2}
@dpsutton: thanks for the response. I was aware of *print-namespace-maps*
, and I guess my problem is that I don't know how to prevent what the doc-string says, which is that the repl re-binds it to true. I thought that maybe in cider there is some control over this, though I admit I don't have great insight into how cider and the repl work together.
Otherwise, I'm not sure where else the point of control would be to prevent the repl from doing this, or to just re-binding it back to false.
might be able to use this var
(defcustom cider-connected-hook nil
"List of functions to call when connected to Clojure nREPL server."
:type 'hook
:group 'cider
:package-version '(cider . "0.9.0"))
i'm guessing its pretty low down that it gets rebound to true by the repl (out of CIDER's control) and you would just need to rebind to false manually
Hmm, thanks for the help, I assume the above hook loads elisp fns, and I'd have to figure out how to load clojure code?
correct. her's an example from cider-create-sibling-cljs-repl
(the callback to startup that creates the second repl for cljs
(cider-nrepl-send-request
`("op" "eval"
"ns" ,(cider-current-ns)
"code" ,cljs-repl-form)
(cider-repl-handler (current-buffer)))
Awesome, thanks, this is a great option if I can't figure out an more idiomatic way to set *print-namespace-maps*
at outside cider.
i don't know boot well but my mental model of it makes me think you just put this form in one of your repl tasks
ok if you are working in lein it looks like this option exists
:global-vars {*warn-on-reflection* true
*assert* false}
for boot it should be pretty simple but i don't knowi think $BOOT_HOME/.profile.boot
can handle this for you and make all of your projects behave as you want them