This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-16
Channels
- # babashka (17)
- # calva (35)
- # clerk (31)
- # cljs-dev (3)
- # clojars (1)
- # clojure (16)
- # clojure-europe (4)
- # clojurescript (38)
- # clojutre (2)
- # cursive (8)
- # datomic (16)
- # exercism (5)
- # fulcro (5)
- # gratitude (3)
- # hyperfiddle (55)
- # joyride (1)
- # lsp (40)
- # off-topic (6)
- # portal (64)
- # practicalli (1)
- # reitit (3)
- # releases (1)
- # shadow-cljs (38)
- # sql (1)
- # tools-deps (8)
- # xtdb (9)
Can I add another item to the wish list for Electric Clojure support? It would be awesome to get Cursive "jump to definition" working on an Electric function when that function is e/defn'd in another namespace. Example:
(ns app.greet
(:require [hyperfiddle.electric :as e]
[hyperfiddle.electric-dom2 :as dom]))
(e/defn Hello []
(dom/p (dom/text "Hello World")))
(ns app.todo-list
(:require [hyperfiddle.electric :as e]
[hyperfiddle.electric-dom2 :as dom]
[hyperfiddle.electric-ui4 :as ui]
[app.greet :as greet]))
(e/defn Todo-list []
(e/client (greet/Hello.)))
Desired behaviour: I could command-click greet/Hello.
to jump to it's definition (this works in Calva according to @dustingetz). Actual behaviour: I see an error message "greet/Hello. cannot be resolved".
Note that if I use (new greet/Hello)
instead of dot notation then jump to definition works as usual. Also, jump to definition already works for Electric functions defined in the current namespace.
Thanks for considering this 🙂Not sure as I've never used the feature, but isn't this already supported via Macro Support? https://cursive-ide.com/userguide/macros.html
Unfortunately that doesn't solve the problem. I've resolved e/defn as defn which gets rid of warnings but still doesn't fix the jump to definition feature
I recall someone getting this to work with Reframe's subscriptions, though. I'm pretty sure it was configured via this feature. I wonder if re-indexing is needed?