This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-15
Channels
- # announcements (5)
- # babashka (56)
- # beginners (24)
- # biff (15)
- # calva (7)
- # clj-kondo (12)
- # cljsrn (8)
- # clojure (68)
- # clojure-denmark (1)
- # clojure-europe (55)
- # clojure-norway (4)
- # clojure-spec (9)
- # clojure-uk (2)
- # clojurescript (8)
- # cursive (11)
- # data-science (7)
- # datahike (1)
- # datomic (66)
- # emacs (12)
- # etaoin (3)
- # fulcro (10)
- # graphql (3)
- # hyperfiddle (97)
- # jobs (1)
- # kaocha (8)
- # lsp (3)
- # malli (15)
- # meander (1)
- # off-topic (3)
- # overtone (4)
- # polylith (7)
- # rdf (25)
- # re-frame (4)
- # reagent (14)
- # remote-jobs (1)
- # shadow-cljs (126)
- # sql (30)
- # vscode (3)
- # xtdb (8)
I usually create tests such as
(is (= nil (my-validate some-data)))
vs
(is (nil? (my-validate some-data)))
(where my-validate
would return nil
if everything is ok), since the former enables me to see a meaningful diff in Cursive/IntelliJ, if the test fails.
However, in recent versions, I don't get a diff if either left or right side is nil. So I'd have to artificially change my test to something like
(is (= {} (my-validate some-data)))
to see the diff.
Is this a regression?A few people have reported this, I believe it’s a bug, I’ll try to look at it in the next day or two.
Hey, I'm thinking about writing an extension for IntelliJ. In it I would need an editor "component". I have not yet looked at all the documentation, but in general would it be possible to use Cursive for this? I mean just embed a regular editor but cursive paredit, etc works in it? would it also be possible to provide additional info so cursive can autocomplete precisely? ie. the ns, require aliases, etc?
So, yes, you should be able to do this, at least partially. Having your plugin depend on Cursive, and creating a Clojure editor where paredit etc will work should be easy. I don’t have a good way to add info for custom resolution, but something like that could be added.
I’d recommend doing it in either Java or Kotlin though, doing it in Clojure will unnecessarily complicate your life.
not sure if I'll ever get around to actually doing this, but good to know it should be possible to at least get proper editing. thanks.
weird question but in this context: I'm experimenting with something where you create files that are CLJ code but not quite CLJ namespaces. I'm abusing .clj files for that currently, just to get syntax highlighting and stuff
problem is that I "sync files in REPL" a lot and cursive wants to include those files. any way I can prevent that?