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
|
# Disable the abbreviated directory format
|
||||||
set fish_prompt_pwd_dir_length 0
|
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
|
# If installed, setup z function
|
||||||
command -q zoxide; and zoxide init fish | source
|
command -q zoxide; and zoxide init fish | source
|
||||||
|
|
||||||
# Git prompt
|
# Git prompt
|
||||||
set -g __fish_git_prompt_showdirtystate 1
|
set -g __fish_git_prompt_showdirtystate 1
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
function diff
|
function diff
|
||||||
if command -q delta
|
command diff -u $argv[1] $argv[2] | 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
|
end
|
||||||
|
70
git/config
70
git/config
@ -1,42 +1,54 @@
|
|||||||
[user]
|
|
||||||
name = Charles Gould
|
|
||||||
useConfigOnly = true
|
|
||||||
[core]
|
|
||||||
autocrlf = input
|
|
||||||
[alias]
|
[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)'
|
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
|
can = commit --amend --no-edit
|
||||||
cand = commit --amend --no-edit --date=now
|
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)'
|
logsearch = log --color=always --format=tformat:'%C(blue)%cs%C(reset) %C(yellow)%h%C(reset) %C(normal)%s%C(reset)'
|
||||||
rbi = rebase --interactive
|
rbi = rebase --interactive
|
||||||
wipe = restore --staged --worktree
|
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
|
|
||||||
[color "status"]
|
[color "status"]
|
||||||
added = yellow
|
added = yellow
|
||||||
changed = green
|
changed = green
|
||||||
untracked = cyan
|
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]
|
[pull]
|
||||||
rebase = true
|
rebase = true
|
||||||
[push]
|
[push]
|
||||||
default = current
|
default = current
|
||||||
[log]
|
[sequence]
|
||||||
date = human
|
editor = interactive-rebase-tool
|
||||||
[stash]
|
[stash]
|
||||||
showPatch = true
|
showPatch = true
|
||||||
showStat = true
|
showStat = true
|
||||||
|
[user]
|
||||||
|
name = Charles Gould
|
||||||
|
useConfigOnly = true
|
||||||
|
@ -7,7 +7,6 @@ ROOTDIR=$(cd "$(dirname "$0")/.." && pwd)
|
|||||||
# Install required tools
|
# Install required tools
|
||||||
brew install \
|
brew install \
|
||||||
bat \
|
bat \
|
||||||
diff-so-fancy \
|
|
||||||
fd \
|
fd \
|
||||||
fish \
|
fish \
|
||||||
fzf \
|
fzf \
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
with import <nixpkgs> {}; [
|
with import <nixpkgs> {}; [
|
||||||
bat
|
bat
|
||||||
diff-so-fancy
|
|
||||||
delta
|
delta
|
||||||
fd
|
fd
|
||||||
fish
|
fish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user