git: switch to delta
This commit is contained in:
parent
219f8b561e
commit
9c0baa8deb
@ -10,13 +10,8 @@ if status --is-interactive
|
||||
# Disable the abbreviated directory format
|
||||
set fish_prompt_pwd_dir_length 0
|
||||
|
||||
# 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
|
||||
command -q zoxide; and zoxide init fish | source
|
||||
command -q zoxide; and zoxide init fish | source
|
||||
|
||||
# Git prompt
|
||||
set -g __fish_git_prompt_showdirtystate 1
|
||||
|
@ -1,9 +1,3 @@
|
||||
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
|
||||
command diff -u $argv[1] $argv[2] | delta
|
||||
end
|
||||
|
70
git/config
70
git/config
@ -1,42 +1,54 @@
|
||||
[user]
|
||||
name = Charles Gould
|
||||
useConfigOnly = true
|
||||
[core]
|
||||
autocrlf = input
|
||||
[alias]
|
||||
aliases = config --get-regexp 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)'
|
||||
can = commit --amend --no-edit
|
||||
cand = commit --amend --no-edit --date=now
|
||||
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 "branch"]
|
||||
current = yellow reverse
|
||||
local = yellow
|
||||
remote = green
|
||||
[color "diff"]
|
||||
meta = yellow
|
||||
frag = magenta bold
|
||||
commit = yellow bold
|
||||
old = red bold
|
||||
new = green bold
|
||||
whitespace = red reverse
|
||||
[color "diff-highlight"]
|
||||
oldNormal = red bold
|
||||
oldHighlight = red bold 52
|
||||
newNormal = green bold
|
||||
newHighlight = green bold 22
|
||||
can = commit --amend --no-edit
|
||||
cand = commit --amend --no-edit --date=now
|
||||
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 "status"]
|
||||
added = yellow
|
||||
changed = green
|
||||
untracked = cyan
|
||||
[core]
|
||||
autocrlf = input
|
||||
pager = delta
|
||||
[delta]
|
||||
features = blame-style diff-style
|
||||
[delta "blame-style"]
|
||||
blame-code-style = syntax
|
||||
blame-format = " {commit:<8} {author:^18} {timestamp:>10} "
|
||||
blame-palette = "#2E3440" "#3B4252" "#434C5E" "#4C566A"
|
||||
blame-separator-style = blue
|
||||
blame-timestamp-output-format = "%v"
|
||||
[delta "diff-style"]
|
||||
file-decoration-style = blue box
|
||||
file-style = blue
|
||||
hunk-header-decoration-style = none
|
||||
hunk-header-line-number-style = blue
|
||||
line-numbers = false
|
||||
minus-style = bold red
|
||||
minus-emph-style = bold red 52
|
||||
plus-style = bold green
|
||||
plus-emph-style = bold green 22
|
||||
zero-style = dim syntax
|
||||
[diff]
|
||||
colorMoved = default
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
[log]
|
||||
date = human
|
||||
[merge]
|
||||
conflictStyle = zdiff3
|
||||
[pull]
|
||||
rebase = true
|
||||
[push]
|
||||
default = current
|
||||
[log]
|
||||
date = human
|
||||
[sequence]
|
||||
editor = interactive-rebase-tool
|
||||
[stash]
|
||||
showPatch = true
|
||||
showStat = true
|
||||
[user]
|
||||
name = Charles Gould
|
||||
useConfigOnly = true
|
||||
|
@ -7,7 +7,6 @@ ROOTDIR=$(cd "$(dirname "$0")/.." && pwd)
|
||||
# Install required tools
|
||||
brew install \
|
||||
bat \
|
||||
diff-so-fancy \
|
||||
fd \
|
||||
fish \
|
||||
fzf \
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
with import <nixpkgs> {}; [
|
||||
bat
|
||||
diff-so-fancy
|
||||
delta
|
||||
fd
|
||||
fish
|
||||
|
Loading…
x
Reference in New Issue
Block a user