diff --git a/config/git/attributes b/config/git/attributes new file mode 100644 index 00000000..a1bd92e5 --- /dev/null +++ b/config/git/attributes @@ -0,0 +1,3 @@ +*.lisp diff=lisp +*.el diff=lisp +*.org diff=org diff --git a/config/git/config b/config/git/config index 9fcfc1f8..067976a4 100644 --- a/config/git/config +++ b/config/git/config @@ -36,3 +36,7 @@ insteadOf = bb: [url "https://git.v0.com"] insteadOf = v0: +[diff "lisp"] + xfuncname = "^(((;;;+ )|\\(|([ \t]+\\(((cl-|el-patch-)?def(un|var|macro|method|custom)|gb/))).*)$" +[diff "org"] + xfuncname = "^(\\*+ +.*)$" diff --git a/modules/shell/git.nix b/modules/shell/git.nix index bce956fe..ba78cbe8 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -21,6 +21,7 @@ in { home.configFile = { "git/config".source = "${configDir}/git/config"; "git/ignore".source = "${configDir}/git/ignore"; + "git/attributes".source = "${configDir}/git/attributes"; }; modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];