This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-20
Channels
- # announcements (1)
- # asami (6)
- # babashka (21)
- # beginners (19)
- # calva (44)
- # circleci (3)
- # clj-http (3)
- # clj-kondo (44)
- # clojure (24)
- # clojure-australia (1)
- # clojure-czech (1)
- # clojure-europe (50)
- # clojure-france (5)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-spec (8)
- # clojure-uk (8)
- # clojurescript (161)
- # datomic (4)
- # fulcro (7)
- # graalvm (8)
- # heroku (4)
- # lambdaisland (4)
- # lein-figwheel (5)
- # lsp (48)
- # malli (21)
- # meander (15)
- # off-topic (35)
- # polylith (2)
- # re-frame (21)
- # react (22)
- # reagent (13)
- # reitit (6)
- # remote-jobs (1)
- # reveal (3)
- # ring (3)
- # shadow-cljs (37)
- # testing (2)
- # tools-deps (10)
- # vim (18)
- # vrac (1)
- # xtdb (17)
Hello, I had opened a github issue, and am looking for additional info for solving the problem I am having with Calva
Whenever I run the promises, I never see the resolved output of the promise in the jack-in window
I see that a promise was fired (the window says #object[Promise [object Promise]]
), but then never see any resolved output in the window
For additional clarification, I am not using shadow-cljs or anything like that, just the plain vanilla node-repl with the CLJS dependency needed to compile CLJS in my deps.edn
(ns temp
(:require [axios]))
(def resp-prom
(.get axios ""))
(.then resp-prom #(js/console.log %))
my understanding is that I should see the output from the js/console.log
after the promise resolves, but do not see any output
Is the promise isn't resolving successfully, it might be resolving unsuccessfully so maybe try .catch
too
Ohh, it might also be that since this is async, js/console.log is printing somewhere else
You could try https://github.com/djblue/portal#usage and see if you can tap> the value instead :thinking_face: #shameless-plug
If it is printing somewhere else, is there a way to redirect this to the running repl in the jack-in window?
also I am using the standard jack-in sequence, and then choosing node-repl
when prompted for a repl
This prints 42
in the output window when I try:
(.then (js/Promise.resolve 42)
#(js/console.log %))
@anonmail053: this also prints 42 :
(def prom (new js/Promise
(fn [resolve, reject]
(js/setTimeout
(fn [_]
(resolve 42))
5000))))
(.then prom #(js/console.log %))
Hi, I wonder if it's possible to customize the commentFormStyle with backgroundColor, such that it extends across the entire width of the screen?
I find this easier to tell at a glance than italics if you're in a comment form, but the jaggedness is quite distracting
I don’t think so. Well, at least not how it is implemented today. Some googling on vscode.TextEditorDecorationType
might dig up something we could use to make this possible,
This seems to hint that adding background color beyond the content isn’t within reach: https://marketplace.visualstudio.com/items?itemName=matthewhazlehurst.line-highlighter
I'm happy with the gutter solution, but somehow you can't just specify a color - I had to make a 1x1px image
I tried setting overviewRulerColor too, but for some reason that disappears when you scroll off screen
I have been wanting to have a marker for when a form is “dirty” compared to what the REPL has evaluated. Seems like the gutter would be a nice place to have such a marker.
I don’t think we have an issue for it. Just sayn’ 😃 If you want to file such an issue, be my guest. Would be good if we looked at what prior art there is. I think CIDER has a similar feature. (iirc, it marks up-to-date forms instead of the dirty ones).
I guess when you (def x ...)
and then def y (something x))
and then go back and change x?
I think it just means specifically if a form either: a) hasn't yet been evaluated b) has been edited since it was last evaluated
Yeah, I'll often write a function, evaluate it, call it and see it doesn't work, change the function and forget to evaluate it. Then re-call it and confuse my simple brain for a minute.
Hi. I always wondered... is there any support for project.clj
or deps.edn
in Calva? Features such as "schema" (or "sanity") "validation", code completion for dependencies or something similar? If not, would something like that even possible/achievable/usable?
@brdloush clj-kondo checks deps.edn
to some degree (and that’s built-in with Calva now, right?).
New Calva out. A change in the ergonomics of one feature, an upstream bug fix and a fix for a regression that had snuck in: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.191 • https://github.com/BetterThanTomorrow/calva/issues/644 • Fix: https://github.com/BetterThanTomorrow/calva/issues/1131 • Bump `cider-nrepl` to https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#02511-2021-04-12