From 426031a62c54e35b167ebb9210982a15e6833ca9 Mon Sep 17 00:00:00 2001 From: Nathan Shelly Date: Fri, 23 Oct 2020 21:26:57 -0700 Subject: [PATCH] git: language-specific diff headers --- nix/git.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nix/git.nix b/nix/git.nix index 505193e7d..1bc100c7b 100644 --- a/nix/git.nix +++ b/nix/git.nix @@ -11,8 +11,10 @@ { path = "~/.gitconfig.local"; } { path = "~/.gitconfig.work"; condition = "gitdir:~/work/"; } ]; + # TODO: confirm what this does lfs.enable = true; + extraConfig = { advice = { # disable help messages @@ -110,6 +112,19 @@ defaultBranch = "main"; }; }; + + # ref - https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more + attributes = [ + "*.css diff=css" + "*.html diff=html" + "*.go diff=golang" + "*.py diff=python" + "*.md diff=markdown" + "*.rb diff=ruby" + "*.rake diff=ruby" + "*.rs diff=rust" + ]; + ignores = [ # Python ".mypy_cache"