This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-18
Channels
- # architecture (33)
- # asami (1)
- # aws (1)
- # babashka (19)
- # beginners (48)
- # bristol-clojurians (1)
- # calva (5)
- # cider (12)
- # cljdoc (15)
- # cljsrn (7)
- # clojure (151)
- # clojure-europe (19)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-provo (4)
- # clojure-spec (9)
- # clojure-uk (21)
- # clojuredesign-podcast (28)
- # clojurescript (33)
- # core-typed (1)
- # cryogen (2)
- # css (6)
- # cursive (10)
- # data-science (1)
- # datomic (20)
- # events (3)
- # expound (72)
- # figwheel-main (5)
- # fulcro (43)
- # graalvm (6)
- # helix (1)
- # kaocha (13)
- # leiningen (2)
- # malli (1)
- # meander (93)
- # membrane (4)
- # off-topic (17)
- # pathom (6)
- # portland-or (5)
- # re-frame (25)
- # reagent (6)
- # reitit (7)
- # reveal (30)
- # shadow-cljs (25)
- # vim (2)
morning!
morning
månmån
Bore da
Bore da! :flag-wales:
Has anyone done one of these for clojure? https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header
Ah interesting. I came up with this while playing around for a few minutes.
[diff "clj"]
xfuncname = "^(\\((defmethod|def|defn|ns).*)$"
Though there's definitely more. And I need to figure out the regex incantation to exclude things beyond the [
so I just get the name
you could do something like xfuncname = "^[ \t]*(\\((ns|def[a-zA-Z0-9_-]*)[ \t]+[^[]+).*$"
, assuming everything you are interested in starts with def
Yeah, ended up with something like that. Seems to work quite nicely: https://gist.github.com/cddr/f269b4465a823e567bd85eb3aa16ed0d
3