From c881813d45bf239676ea0acf7aee399ebbcbf893 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 14 Apr 2024 14:42:24 +0200 Subject: Improve diffing for Common and Emacs Lisps --- user/settings/development/lisp.nix | 7 +++++++ user/settings/emacs.nix | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/user/settings/development/lisp.nix b/user/settings/development/lisp.nix index 9ad918d2..ba1bd048 100644 --- a/user/settings/development/lisp.nix +++ b/user/settings/development/lisp.nix @@ -9,4 +9,11 @@ asdf cl-launch ]; + + programs.git.attributes = [ + "*.lisp diff=common-lisp" + ]; + programs.git.extraConfig."diff.common-lisp" = { + xfuncname = "^\\((def\\S+\\s+\\S+)"; + }; } diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index 2871173c..92ba39e2 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -27,6 +27,13 @@ in ../modules/eshell.nix ]; + programs.git.attributes = [ + "*.el diff=elisp" + ]; + programs.git.extraConfig."diff.elisp" = { + xfuncname = "^\\((((def\\S+)|use-package)\\s+\\S+)"; + }; + programs.emacs = { enable = true; package = lib.mkDefault (pkgs.emacs29.override { withGTK3 = true; }); -- cgit 1.4.1