This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-29
Channels
- # announcements (1)
- # babashka (120)
- # beginners (184)
- # cider (14)
- # clara (2)
- # clj-kondo (25)
- # cljfx (9)
- # cljsrn (43)
- # clojure (46)
- # clojure-australia (2)
- # clojure-berlin (5)
- # clojure-dev (2)
- # clojure-europe (10)
- # clojure-france (3)
- # clojure-nl (1)
- # clojure-spec (14)
- # clojure-uk (30)
- # clojurescript (50)
- # code-reviews (19)
- # conjure (11)
- # core-logic (2)
- # cursive (20)
- # datascript (1)
- # datomic (74)
- # figwheel-main (1)
- # fulcro (10)
- # funcool (2)
- # graphql (1)
- # lambdaisland (1)
- # malli (2)
- # meander (22)
- # nrepl (13)
- # off-topic (28)
- # overtone (3)
- # pathom (7)
- # pedestal (4)
- # re-frame (4)
- # reagent (16)
- # reitit (4)
- # releases (1)
- # ring (8)
- # shadow-cljs (93)
- # specter (6)
- # sql (13)
- # test-check (1)
- # tools-deps (1)
- # tree-sitter (2)
- # vim (8)
- # xtdb (25)
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.
Hello!
Apparently my cursive installation (or IDEA) is not able to recognize some functions that are declared using https://github.com/plumatic/schema 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 https://cursive-ide.com/userguide/macros.html
Thank you!
Cursive should support those out of the box, though. @U0168NRNKDJ Is your project available anywhere to look at, or is it private?
The repo is private, unfortunately, but even with Imre's suggestion, IDEA keeps complaining 😕
Sure, will do and post it here
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?
Schema is imported using [schema.core :as s]
, as usual
Worth mentioning that the error says "Incorrect arity"
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.
I've tried that but it does not seem to work
Please, ping me in case I can help in any way