diff --git a/fish/config.fish b/fish/config.fish index d10f5f2..2d8eb48 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -12,6 +12,7 @@ if status --is-interactive # If installed, setup git tools command -q diff-so-fancy; and set -gx GIT_PAGER "diff-so-fancy | $PAGER" + command -q delta; and set -gx GIT_PAGER 'delta --diff-so-fancy' command -q interactive-rebase-tool; and set -gx GIT_SEQUENCE_EDITOR interactive-rebase-tool # If installed, setup z function diff --git a/fish/functions/diff.fish b/fish/functions/diff.fish new file mode 100644 index 0000000..c527f73 --- /dev/null +++ b/fish/functions/diff.fish @@ -0,0 +1,9 @@ +function diff + if command -q delta + command diff -u $argv[1] $argv[2] | delta --diff-so-fancy + else if command -q diff-so-fancy + command diff -u $argv[1] $argv[2] | diff-so-fancy + else + command diff -u $argv[1] $argv[2] + end +end diff --git a/fish/functions/dsf.fish b/fish/functions/dsf.fish deleted file mode 100644 index e84e62f..0000000 --- a/fish/functions/dsf.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dsf - command diff -u $argv[1] $argv[2] | diff-so-fancy -end diff --git a/git/config b/git/config index f633b1a..06b30b7 100644 --- a/git/config +++ b/git/config @@ -3,7 +3,6 @@ useConfigOnly = true [core] autocrlf = input - editor = nvim [alias] aliases = config --get-regexp alias branchsort = branch --sort='-committerdate' --format='%(HEAD) %(color:blue)%(committerdate:short)%(color:reset) %(if)%(worktreepath)%(then)%(color:reverse yellow)%(refname:short)%(color:reset)%(else)%(color:yellow)%(refname:short)%(color:reset)%(end) %(color:green)%(upstream:short)%(color:reset)' @@ -12,8 +11,6 @@ logsearch = log --color=always --format=tformat:'%C(blue)%cs%C(reset) %C(yellow)%h%C(reset) %C(normal)%s%C(reset)' rbi = rebase --interactive wipe = restore --staged --worktree -[color] - ui = auto [color "branch"] current = yellow reverse local = yellow diff --git a/install/install-brew-packages.sh b/install/install-brew-packages.sh index 32ab401..722d7df 100755 --- a/install/install-brew-packages.sh +++ b/install/install-brew-packages.sh @@ -12,6 +12,7 @@ brew install \ fish \ fzf \ git \ + git-delta \ git-interactive-rebase-tool \ less \ macchina \ diff --git a/nix/packages.nix b/nix/packages.nix index f33c828..2ccb34f 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -5,6 +5,7 @@ with import {}; [ bat diff-so-fancy + delta fd fish fzf