This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-16
Channels
- # aleph (1)
- # announcements (16)
- # babashka (36)
- # beginners (62)
- # calva (15)
- # cider (21)
- # cljsrn (5)
- # clojure (84)
- # clojure-dev (3)
- # clojure-europe (22)
- # clojure-italy (2)
- # clojure-nl (2)
- # clojure-uk (3)
- # clojurescript (36)
- # core-async (2)
- # cursive (4)
- # datomic (8)
- # emacs (14)
- # events (1)
- # fulcro (4)
- # hyperfiddle (6)
- # introduce-yourself (3)
- # jobs (1)
- # leiningen (4)
- # lsp (100)
- # nrepl (3)
- # off-topic (36)
- # pathom (17)
- # podcasts-discuss (1)
- # polylith (4)
- # portal (14)
- # react (1)
- # reagent (3)
- # reitit (8)
- # releases (3)
- # remote-jobs (1)
- # reveal (7)
- # shadow-cljs (19)
- # sql (16)
- # web-security (3)
Macros pulled in from a require are not resolving such that I can jump to their definition. Functions work OK in this regard. Macros do compile fine.
[tiltontec.mxweb.gen-macro
:refer-macros [audio img input figure p a span div button br]
:as mxw]
Originally the :as
option was not being specified, but I tried it to match the doc example with gloss
. No help.
The doc says "When the caret is the head symbol of a macro form which is not handling the symbol resolution correctly, you'll see the intention lightbulb near the left margin and you can use ⌥↩️ to customise how that form is interpreted:" but all I get is an option to create a function of the same name.
I made it to "Preferences>Languages & Frameworks>Clojure>Symbol Resolution" but that just says "Nothing to show" and offers no "+" button.
Is this in fact doable? Thx!How are those macros defined in tiltontec.mxweb.gen-macro
? Is there a (defmacro audio [] ...)
there somewhere, or are they autogenerated somehow?
The macros are auto-generated, by a macro-writing macro. 🙂
So that’s the problem - Cursive has no way of knowing what those macros are. For libraries, this is handled by stub generation (https://cursive-ide.com/userguide/macros.html#stub-generation). However this currently only works for specific hard-coded namespaces. I have plans to allow you to specify namespaces which get this treatment, but initially at least they will probably only be from libraries, since the cache invalidation is very complicated otherwise.