Fork me on GitHub

is there any way to eval in place (in editor) in for ex. in comments (similar to CIDER behaviour) without going to REPL window?


Yes, but only after you bring up a REPL. Then Tools>repl>(various options to send things to repl) will be available. I mean, it still “goes to the repl”, but I do not have to 🙂. Also, not sure if you meant “…and dump the output into my source file”. I do not know if Cursive does that. btw, Instead of a text comment involving ;;; I use the clojure comment form to hold snippets. Then I do not have to select a form to evaluate, just position the cursor in/after the form. Cursive then evaluates the ouermost form around the cursor, excluding comment of course.

Jovanny Cruz14:09:22

Hello! Apparently my cursive installation (or IDEA) is not able to recognize some functions that are declared using like (s/defn my-function...). IDEA keeps marking functions calls in red and complains about the arity even if the number of arguments is correct. Is there any way to solve this problem? IDEA version 2020.2.2 Cursive version 1.9.3-2020.2


Hey there. You should be able to teach cursive about these, see


Cursive should support those out of the box, though. @U0168NRNKDJ Is your project available anywhere to look at, or is it private?

Jovanny Cruz20:09:50

The repo is private, unfortunately, but even with Imre's suggestion, IDEA keeps complaining 😕


Could you create a small repro repo that shows the problem?

👍 3
Jovanny Cruz20:09:51

Sure, will do and post it here

Jovanny Cruz20:09:52

In the small repo IDEA and Cursive works just fine, I just needed to click on "resolve as defn", but in the repo of the company I work for they do not work


Resolving as plain defn won’t work, because it’s not aware of the type hints. But Cursive does include support for schema, which is why I’m surprised it doesn’t work out of the box. Have you vendored schema under a different namespace, or anything like that?

Jovanny Cruz20:09:14

Schema is imported using [schema.core :as s], as usual

Jovanny Cruz20:09:34

Worth mentioning that the error says "Incorrect arity"


Ok, I’ll take a look at the repro and see if I can figure it out.

Jovanny Cruz20:09:46

Thank you! BTW, my teammates can open up the exact same repo but using an older version of IDEA (2019) and no complaints appear


That’s very strange. One thing you could try is File->Invalidate caches and restart, it’s possible your indexes have gotten funky.

Jovanny Cruz20:09:15

I've tried that but it does not seem to work


Ok, there must be something else going on then.

Jovanny Cruz20:09:07

Please, ping me in case I can help in any way


Sure, the most important thing is just a repro case - hopefully I can figure it out from there.