This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-23
Channels
- # announcements (3)
- # architecture (10)
- # babashka (37)
- # beginners (69)
- # calva (2)
- # cider (10)
- # clerk (22)
- # clj-kondo (33)
- # cljdoc (44)
- # clojure (45)
- # clojure-conj (4)
- # clojure-denmark (7)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (10)
- # clr (19)
- # conjure (1)
- # emacs (28)
- # events (1)
- # fulcro (1)
- # jobs (1)
- # joyride (1)
- # lsp (18)
- # malli (30)
- # membrane (3)
- # off-topic (23)
- # pathom (45)
- # portal (29)
- # proletarian (7)
- # rdf (15)
- # re-frame (21)
- # reagent (2)
- # releases (6)
- # remote-jobs (1)
- # reveal (6)
- # shadow-cljs (36)
- # slack-help (7)
- # sql (5)
- # tools-deps (3)
Is there a way to hide the metadata, but showing the clojure form?
E.g. the following where you would only see (def a 1)
and not the metadata form.
^{:nextjournal.clerk/visibility {:result :hide}}
(def a 1)
I guess I could wrap the form with the map settings
{:nextjournal.clerk/visibility {:result :hide :code :show}}
(def a 1)
{:nextjournal.clerk/visibility {:result :hide :code hide}}
But this feels a little fragilewhich clerk version are you on? We hide the metadata as of https://github.com/nextjournal/clerk/commit/0bae6fdb2bce6d86e70ab62270ebbecfc105a652
Ah probably an older one 😅 I’ll check
“0.12.707”
I’ll check it with that version
With
io.github.nextjournal/clerk {:git/sha "0bae6fdb2bce6d86e70ab62270ebbecfc105a652"}
It works! Thanks! @U5H74UNSF@U0FT7SRLP cool, glad to hear
Does anyone have a writeup on using Clerk with Calva?
It’s not mentioned in https://book.clerk.vision/#editor-integration
Just to comment here, that I see "two ways" of using Clerk from Calva. 1. "Clerk as notebook viewer" 2. "Clerk as single value viewer using Clerk tap inspector" These are different workflows and maybe require different "snippets" or "keys" for easier integration
It's under-documented for now. Just mentioned in the change log: https://github.com/nextjournal/clerk/blob/main/CHANGELOG.md#011603-2022-10-17
In principle it supports all Clerk viewers (a bit tricky to configure) and use. Using it as a "tap>" target has no obvious way of choosing the viewer to use. But wrapping a value in Clerk specific metadata which sets the viewer would work.
If you are interested, I have some EmacsLisp code which does this for Emacs.
💭 reminds me of https://cljdoc.org/d/djblue/portal/0.35.1/doc/guides/default-viewer in portal. am I on the wrong path?
You can also pop open a simple browser in VS Code (`simpleBrowser.show`) and point it to your https://localhost:7777 It's not perfect but its noice enough. Additionally, you can https://cljdoc.org/d/djblue/portal/0.35.1/doc/guides/clerk and get the best of both worlds in said browser window. I personally am running the Portal VS Code extension which plays decently. I think Joyride might be able to glue a lot of this stuff together.
@U04GFG14FCP Your link described "viewer selection" for Portal, while mine does "viewer selection" for Clerk. And mine adds to it "interactive viewer selection" done by Emacs. (running Clojure code which wraps the value) In your example you suppose to send values e to "tap>" by "writing code in repl". My examples does it "on keypress" in Emacs. (integrated in the Emacs cider-inspector)
@U7CAHM72M sorry, I’m new to this. thanks for helping me out — I’m aware of the difference, I was just wondering if the mechanism, adding metadata like this, was the same. 😅
Integrating Emacs cider-inspector
and Clerk:
https://app.slack.com/client/T03RZGPFR/C0617A8PQ/thread/C0617A8PQ-1674486881.210099