Fork me on GitHub

Is there a way to disable ; commented text as Markdown in Clerk render for ns, so I can use these ; comments as quick code comments for quick repl play, without blowing up or distracting from the rendering of actual function returns in Clerk view? I am familiar with turning everything off by default, then opting-in to individual rendered bits. But then I have to clutter the code with a lot of metadata declarations. I would like to see code results by defualt but not ; commented code as rendered markdown.

Sam Ritchie20:01:20

you could do #_"quick comment"


I think you could also implement this by tweaking the default viewers and using reset-viewers! .


Using ; comments is more ergonomic for me when I want to comment several forms on the same level with one keyboard shortcut, without having to count them like #_#_#_, or introduce a nil with (comment) . Maybe some editor config could help me out here.. Thanks. I will look into customizing the viewers.

👍 2

This also causes minor issues for me. You can do #_ (comment ...) but it is not ideal. I created to track this question.

Sam Ritchie20:01:49

hey all, I’m writing a couple of deps-new templates for Clerk, mostly to make it easy to do custom cljs and use projects like the ones I’ve been writing… if anyone wants to test this out, the first draft runs like this. install deps-new

clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.13"}' :as new
then run
clojure -Sdeps '{:deps {io.github.nextjournal/clerk-cljs-demo {:git/sha "b805370715fdcaf34f6a9d6cb2efc2b12153c90c"}}}' \
  -Tnew create \
    :template clerk/custom \
    :name myusername/mycoollib
replacing myusername/mycoollib with what you want your project to be called, like org.mentat/mycoollib… this will a folder mycoollib with a bunch of stuff set up. it has a bunch of babashka tasks, so if you have that installed, then
bb clerk-watch
will get a watcher going;
bb publish-local
will perform a static build with custom JS,
bb release-gh-pages
will do the same but release to github… all of this is compatible out of the box too

🎉 7
🌱 5

Hail Sam! I am giving this a go. In the it instructs you to run bb start-clerk but bb.edn does not know this task. Is this supposed to be bb clerk-watch?

Sam Ritchie20:04:02

Here is the up to date version!


WhooO! Still looking for guinea pigs?

Sam Ritchie20:04:21

Sure, I’d love feedback


Huzah! That worked great. I will let you know if I find anything or just make a PR. Thank you so much for sharing this.

💯 1
Sam Ritchie20:01:18

I am looking for guinea pigs to try this out before I go crazy documenting it, so let me know if you’re interested in kicking the tires and talking it through with me!