This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-27
Channels
- # announcements (16)
- # architecture (19)
- # beginners (31)
- # calva (2)
- # cider (1)
- # clerk (4)
- # clj-yaml (58)
- # cljdoc (2)
- # cljs-dev (10)
- # clojure (77)
- # clojure-europe (108)
- # clojure-norway (26)
- # clojure-sanfrancisco (2)
- # conjure (1)
- # cursive (2)
- # datahike (5)
- # datomic (13)
- # emacs (7)
- # etaoin (3)
- # hyperfiddle (15)
- # introduce-yourself (3)
- # kaocha (1)
- # off-topic (21)
- # reagent (4)
- # releases (1)
- # shadow-cljs (41)
- # spacemacs (28)
- # specter (8)
- # squint (30)
- # yamlscript (2)
More of random thing to share, today I tweaked my docstring rendering thingy to remove backticks in docstrings, and render them in a different color. code in ๐งต if it helps anyone.
๐ 6
2
(defun replace-backtick-words (s)
"Replace each backtick-delimited word in S with the same word, propertized with font-lock-comment-face."
(let* ((input-string (propertize s 'face 'font-lock-string-face))
(start 0))
(while (string-match "`\\([^`]+\\)`" input-string start)
(let* ((match-string (match-string 1 input-string))
(propertized-match-string (propertize match-string 'face 'clojure-keyword-face)))
(setq input-string (replace-match propertized-match-string t t input-string))
(setq start (- (match-end 0)
;; 2, because we removed two backticks:
2))))
input-string))
generated by gpt4, I had to add a couple tweaks for it to actually work๐ 4