This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-25
Channels
- # announcements (66)
- # aws (1)
- # beginners (60)
- # boot (6)
- # calva (80)
- # cider (3)
- # clj-kondo (14)
- # cljdoc (4)
- # cljs-dev (27)
- # clojure (65)
- # clojure-dev (24)
- # clojure-europe (13)
- # clojure-gamedev (3)
- # clojure-italy (3)
- # clojure-nl (21)
- # clojure-uk (35)
- # clojurescript (98)
- # cursive (25)
- # data-science (3)
- # datomic (10)
- # dirac (16)
- # duct (2)
- # events (2)
- # fulcro (39)
- # jobs-discuss (1)
- # malli (2)
- # other-languages (1)
- # pedestal (26)
- # re-frame (61)
- # reagent (1)
- # reitit (7)
- # shadow-cljs (230)
- # specter (1)
- # tools-deps (29)
- # vim (1)
- # yada (4)
@helios Ah, I see the problem (after finally opening your link) - it looks like rewrite-clj has vendored potemkin as rewrite-clj.potemkin
. You should be able to fix that by using Resolve As… potemkin.namespaces/import-vars
(see https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution)
did you need to add "manual" support for that or cursive infers it from the defmacro directly?
I have a variation on the resolution issue, I’m guessing/hoping a naïve one — in my shadow-cljs/deps.edn project, I’m finding that nothing based upon the (js/
namespace resolves.
I do have a clojurescript dependency explicitly listed and for what it’s worth, trying to ‘Go to definition’ (Cmd+Click) on js
leads nowhere (although the hover-box reads alias "js"
).
These are my shadow-cljs.edn and deps.edn files: https://gist.github.com/tekacs/ddbf8536846c52138d3bbeca6f736ebd
Might anyone be able to tell me what I’m missing? 🙂
@thheller solved this in #shadow-cljs. Thanks! He pointed out that Cursive doesn’t support js/ — that works for me, since I have little use for it and I’ll just keep it to a few places, as nice as it would be to have that function (it works well in Scala.js which has explicit bindings matching MDN, but I understand why it would not here). :)
How do I do a “Raise All”? Turn this:
(try
(fn-1)
(fn-2))
(catch Exception e
(println "Oops"))
Into
(fn-1)
(fn-2)
Just Raising
(fn-1)
deletes the forms following it, and thus kills (fn-2)
.Actually, getting to this is what I want. Raise the two forms out of the try
(or do
, or let
, or …)
(fn-1)
(fn-2)
(catch Exception e
(println "Oops"))
+1 - seems like this is the behavior I got in emacs paredit but don't have in cursive and it still throws me off sometimes
Not sure if there is a way to do that - the way I do it is in two strokes - Alt+S to splice the try, then kill the leftover try
on that line (I use the Vim plugin so that's DD for me subsequently).
On a somewhat unrelated note, even after so many years editing Clj is such a drug that writing anything other than a Lisp always feels incredibly cumbersome.
i've settled on the alt-s(plice) approach; it feels like unnecessary overhead to learn extra shortcuts for a not so frequent operation when it's quite trivial to compose from simpler primitives
@thheller solved this in #shadow-cljs. Thanks! He pointed out that Cursive doesn’t support js/ — that works for me, since I have little use for it and I’ll just keep it to a few places, as nice as it would be to have that function (it works well in Scala.js which has explicit bindings matching MDN, but I understand why it would not here). :)
do you mean something like (with a connected repl): • put cursor after an expression in the editor • bring up context menu, say by right-clicking • choose the REPL submenu • choose "Send '<code>' to REPL" (here, alt-shift-p shortcuts the process) ?
in the case i was testing, there were two menu items that were labeled the same, but it appears the second one is labeled 'Send form before caret to REPL' under other circumstances -- not sure how the two differ.