about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-01-12 12:12:07 +0000
committerDavid Morgan <djm_uk@protonmail.com>2023-01-12 12:12:07 +0000
commit5371b5643877c9348bc2abe21759ecf8e475596e (patch)
treee8d28d2b6b9a4b80bd7a7832df28038f3ce9e253
parenta6ebfc0dbb03d541dcdd7987cbc91fc21cc4e2a0 (diff)
downloaddotfiles-5371b5643877c9348bc2abe21759ecf8e475596e.tar.gz
Improve elisp and clojure diffs
-rw-r--r--nix-conf/home/includes/common.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nix-conf/home/includes/common.nix b/nix-conf/home/includes/common.nix
index 875dfc8..675a707 100644
--- a/nix-conf/home/includes/common.nix
+++ b/nix-conf/home/includes/common.nix
@@ -207,11 +207,17 @@ in
       update-master = "!git fetch origin master:master";
       update-main = "!git fetch origin main:main";
     };
+    attributes = [
+      "*.el diff=elisp"
+      "*.clj diff=clojure"
+    ];
     extraConfig = {
       core.editor = "vim";
       diff = {
         tool = "difftastic";
         colorMoved = "default";
+        elisp = { xfuncname = "^\\((((def\\S+)|use-package)\\s+\\S+)"; };
+        clojure = { xfuncname = "^\\((def\\S+\\s+\\S+)"; };
       };
       difftool = {
         prompt = false;