cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
ghosttoaster 2021-02-15T05:49:32.276300Z

Is it possible to get a fresh prompt without deleting your current input? Like in bash, where if you hit ctrl-c before you finish the command, you immediately get a fresh prompt to type into?

Yehonathan Sharvit 2021-02-15T07:16:19.276800Z

How could we limit the size of cider REPL buffer?

Yehonathan Sharvit 2021-02-15T07:16:41.277300Z

In spacemacs, when the buffer is too big, emacs becomes irresponsive

Yehonathan Sharvit 2021-02-15T07:17:07.277900Z

or maybe there is a way not to write anything to the REPL buffer?

Yehonathan Sharvit 2021-02-15T07:17:14.278200Z

Or other tips and tricks

Yehonathan Sharvit 2021-02-15T07:20:23.278400Z

I am on MacOs

Yehonathan Sharvit 2021-02-15T07:23:55.279100Z

cider-repl-buffer-size-limit is set to: 100

Yehonathan Sharvit 2021-02-15T07:25:08.279500Z

cider-repl-buffer-size-limit is set to: 100
cider-print-buffer-size is set to: 4096

2021-02-15T09:59:19.280100Z

When an exception gets thrown in my clojure process, it takes "a while" (multiple seconds) for the cider exception window to pop up.

2021-02-15T09:59:25.280400Z

Any idea what might cause this? It's ... unpleasant.

2021-02-15T10:10:32.280800Z

Ok, I went and updated to the most recent middleware and nrepl versions, and that seems OK.

2021-02-15T10:10:43.281200Z

It would be cool if there were an easy way to figure out what versions to use without reading project.clj files for each project.

niveauverleih 2021-02-15T11:30:48.287700Z

I have a question concerning pomegranate: I added the following code in ~/.lein/profiles.clj: {:user {:dependencies [[clj-commons/pomegranate "1.2.0"]] :injections [(defn add-dependency [dep-vec] (require 'cemerick.pomegranate) ((resolve 'cemerick.pomegranate/add-dependencies) :coordinates [dep-vec] :repositories (merge @(resolve 'cemerick.pomegranate.aether/maven-central) {"clojars" "https://clojars.org/repo"})))]}} (adapted from plexus' answer here: https://clojureverse.org/t/how-to-use-a-dependency-from-clojure-repl-without-starting-a-lein-project/1596/5 When I start a lein repl, the function is now available. In a cider repl however, it is not known in the user namespace. What am I doing wrong?

iarenaza 2021-02-15T11:31:03.287900Z

@pmooser As far as I know, if you don't force any particular versions yourself, CIDER requests the exact versions it wants when used with cider-jack-in-clj. It even shows you the exact command line it uses to launch lein, boot, clj or whatever tool you use to launch your environment, which includes the middleware an nrepl versions it's requesting.

2021-02-15T17:29:22.294100Z

hey folks!! I have a little issue using clj-refactor from within cider . Instead of jacking-in from cider, I am running a repl from the command line and then cider-connect from within cider to it. As soon as I try to use clj-refactor though it keeps telling me that I might have forgotten to install the nrepl-refactor middleware. I had this in my ~/.clojure/deps.edn :

:cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.22.4"}}
            :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} 
I thought that adding refactor-nrepl.middleware/wrap-refactor to the --middlewares would solve the issue but it seems that it is not ... can anyone help please ? thanks 🙏

dpsutton 2021-02-15T17:31:55.295Z

if you start a new project with an empty deps file and then cider-jack-in, it will show the jack in string its using. you can mimic that to ensure you're starting up the way CIDER needs to.

2021-02-15T17:35:38.295800Z

oh ok ... so that I can pick up the command line arguments you mean 👍 fair point!! thanks a lot @dpsutton I will give that a shot

dpsutton 2021-02-15T17:36:17.296500Z

yeah. that shows what it would ideally look like. i suspect you need the refactor dep in your extra deps and then the middleware in the main opts

dpsutton 2021-02-15T17:36:53.297300Z

i think that stuff tries to resolve middleware but ignores things it doesn't recognize. so if you just added the middleware to the middleware vector but not the jar which provides the middleware, it will just be ignored

1👍1🙏
2021-02-15T17:37:45.297600Z

oh right makes sense thanks for the tips

2021-02-15T17:37:50.297800Z

I will check that out

2021-02-15T17:58:19.299Z

worked like a charm @dpsutton thank you so much 🙏😊

1