Fork me on GitHub
#cider
<
2021-02-15
>
ghosttoaster05:02:32

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 Sharvit07:02:19

How could we limit the size of cider REPL buffer?

Yehonathan Sharvit07:02:41

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

Yehonathan Sharvit07:02:07

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

Yehonathan Sharvit07:02:14

Or other tips and tricks

Yehonathan Sharvit07:02:55

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

Yehonathan Sharvit07:02:08

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

pmooser09:02:19

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

pmooser09:02:25

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

pmooser10:02:32

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

pmooser10:02:43

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.

niveauverleih11:02:48

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?

iarenaza11:02:03

@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.

kaffein17:02:22

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 🙏

dpsutton17:02:55

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.

kaffein17:02:38

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

dpsutton17:02:17

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

dpsutton17:02:53

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

👍 3
🙏 3
kaffein17:02:45

oh right makes sense thanks for the tips

kaffein17:02:50

I will check that out

kaffein17:02:19

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

cider 3