This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-14
Channels
- # announcements (2)
- # aws (1)
- # babashka (18)
- # babashka-sci-dev (103)
- # beginners (165)
- # calva (51)
- # cider (8)
- # circleci (1)
- # clj-kondo (22)
- # clj-on-windows (2)
- # cljdoc (1)
- # cljfx (31)
- # cljs-dev (16)
- # clojure (81)
- # clojure-europe (71)
- # clojure-nl (7)
- # clojure-uk (11)
- # clojurescript (20)
- # code-reviews (26)
- # conjure (1)
- # contributions-welcome (1)
- # core-async (15)
- # cursive (8)
- # datomic (8)
- # defnpodcast (2)
- # eastwood (24)
- # emacs (10)
- # events (1)
- # fulcro (4)
- # funcool (31)
- # graalvm (43)
- # graphql (8)
- # honeysql (9)
- # introduce-yourself (1)
- # jobs (12)
- # kaocha (3)
- # lsp (28)
- # malli (4)
- # meander (4)
- # membrane (7)
- # off-topic (64)
- # other-languages (3)
- # pedestal (1)
- # polylith (31)
- # portal (5)
- # re-frame (4)
- # reitit (1)
- # releases (5)
- # rum (2)
- # schema (2)
- # sci (34)
- # shadow-cljs (21)
- # vscode (1)
Thank you but I'm on Calva. I intend to study your magic one day :)
@holyjak You can setup a custom command in Calva with @seancorfield's code. It's a bit uglier because JSON doesn't allow multiline strings (@domagala.lukas is looking at allowing the commands to be specified in EDN) but anyway.
@holyjak my calva version, mostly stolen from @seancorfield :
"calva.customREPLCommandSnippets": [
{
"name": "Add libs",
"snippet": "((requiring-resolve 'clojure.tools.deps.alpha.repl/add-libs) '{$selection})"
},
{
"name": "Start Portal",
"key": "p",
"snippet": "(do (ns dev) (def portal ((requiring-resolve 'portal.api/open) {:portal.launcher/window-title (System/getProperty \"user.dir\")})) (try (let [r! (requiring-resolve 'portal.runtime/register!) html (fn [url] (with-meta [:div {:style {:background :white}} [:portal.viewer/html (slurp url)]] {:portal.viewer/default :portal.viewer/hiccup}))] (run! (fn [[k f]] (r! f {:name k})) {'dev/->file (requiring-resolve ') 'dev/->html html 'dev/->map (partial into {}) 'dev/->set (partial into #{}) 'dev/->vector (partial into [])})) (catch Throwable _)) (add-tap (requiring-resolve 'portal.api/submit)))"
}
]
we are currently working on a PR that lets tools like portal have calva snippets included and auto-loaded, which will make it even easier.
🤯 2