Fork me on GitHub
#cider
<
2016-10-16
>
triss08:10:14

hey all. so if I want pretty printing all the time what's the best way to get it? is there a way to add fipp to every session?

zilti11:10:03

Is there some way I can get cider to inject dependencies despite the "cider boot parameters" setting not being the default?

richiardiandrea12:10:02

@zilti can you give an example of the boot command that you have and dependency you want to inject?

richiardiandrea12:10:03

I worked on a PR (still needs approval) to have a custom task doing the injection for boot versions > 2.7.0 so maybe I can help you with that

zilti12:10:57

@richiardiandrea I want to change it from "repl -s wait" to "dev" (I have a "dev" task that simply "comp"s a couple tasks together), and I want cider to still inject the dependencies it normally injects for a jack-in.

richiardiandrea13:10:30

@zilti I usually have a cider task in my profile boot and I chain boot cider dev for that

richiardiandrea13:10:22

(deftask cider
  "Add CIDER support:
   "
  []
  (require 'boot.repl)
  (swap! boot.repl/*default-dependencies*
         concat '[[cider/cider-nrepl "0.14.0"]
                  [venantius/ultra "0.4.1"]
                  [org.clojure/tools.nrepl "0.2.12"]
                  [refactor-nrepl "2.2.0"]])
  (swap! boot.repl/*default-middleware*
         concat '[refactor-nrepl.middleware/wrap-refactor
                  cider.nrepl/cider-middleware])
  identity)

zilti14:10:42

@richiardiandrea hmm. So pretty much like putting it into the "global" boot file? How does cider determine if the "cider boot parameters" variable is good enough for it to inject the dependencies?

tyler16:10:42

Is there a way to turn off automatically injecting refactor-nrepl?

benedek16:10:30

(setq cljr-inject-dependencies-at-jack-in nil)

tyler16:10:38

Where is that configured? I can't seem to find it in the rtd

tyler16:10:48

ah thank you

benedek16:10:02

cider has a similar defcustom

tyler16:10:14

Do I also have to set the cider defcustom?

benedek16:10:49

nope. just bit of extra info to confuse you. sry 😉

tyler16:10:16

np thanks again

benedek16:10:38

no worries

tyler16:10:12

So I added that line and eval'ed it but when I run cider-jack-in-cljs it still shows that its injecting refactor-nrepl in the minibuffer

benedek16:10:44

hm.. strange

benedek16:10:08

well tbh not that strange. what cljr does is to add its own middlewares to a list in cider. this addition happens after cider is loaded

benedek16:10:48

so if it was added already in your emacs/cider session it is there for that session.

benedek16:10:29

in short easiest if you restart your emacs, set the variable to nil and jack in

richiardiandrea17:10:23

@zilti mmm, I don't understand the question maybe, but you add a custom command line for boot and then the cider task injects the middleware, you are in control of both parts and you can decide where to apply it (with .dir-locals.el for instance)

josh.freckleton19:10:30

Is there a way to have a CLJ and separate CLJS repl when I'm jacked in to CIDER? Ex, I'd love if when I request an http route on my server, if I can see a debugging printout in that backend repl. And then the same for CLJS.

hans20:10:37

I've got trouble with cider after upgrading to 0.14.0:

ELISP> (when-let ((a 1)) a)
*** Eval error ***  Wrong number of arguments: when-let, 1

hans20:10:32

this when-let syntax is used in cider everywhere, but for some reason, emacs' cl package does not grok it in my install (emacs 25.1.1 on OSX)

hans20:10:47

I seem to be able to work around the issue by unconditionally defining when-let in cider-compat.el, but that seems not to be the right thing to do.

jcsims21:10:47

@benedek awesome, thanks for the pointers. I did not know about cljr-toggle-debug-mode