Created
April 10, 2017 16:56
-
-
Save amalloy/ea5eada8a5bffc722b9ba8e44b7d5e2c to your computer and use it in GitHub Desktop.
Clojure-aware git-diff hunk headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.clj diff=clojure | |
*.cljs diff=clojure | |
*.cljx diff=clojure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global core.attributesfile ~/.gitattributes | |
git config --global diff.clojure.xfuncname '(^\(.*|\s*\(defn.*)' |
Nowadays, you don't need to use a custom ~/.gitattributes
file.
You can save this file in the default location ~/.config/git/attributes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That regex can be extended to be used for so many more forms 😄
defmacro
,defmethod
.deftest
. etc.