Skip to content

Commit

Permalink
git: language-specific diff headers
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanshelly committed Oct 24, 2020
1 parent 61c8cf5 commit 426031a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nix/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 426031a

Please sign in to comment.