From 2cdab434ac074f10c8edeb13a162c001b0c23d59 Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Mon, 11 Aug 2025 16:27:48 +0200 Subject: [PATCH] (git) introducting diff-so-fancy --- config/common/git/config | 8 +++++++- config/common/zsh/.zshrc | 3 ++- install.sh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/common/git/config b/config/common/git/config index 3413630..9b25071 100644 --- a/config/common/git/config +++ b/config/common/git/config @@ -10,7 +10,7 @@ gpgsign = true [core] autocrlf = false - pager = less -FRX + pager = diff-so-fancy | less --tabs=2 -RF [gpg] format = ssh [http] @@ -26,3 +26,9 @@ [include] path = ~/.local/config/git +[interactive] + diffFilter = diff-so-fancy --patch +[diff-so-fancy] + markEmptyLines = true + changeHunkIndicators = true + rulerWidth = 40 diff --git a/config/common/zsh/.zshrc b/config/common/zsh/.zshrc index e25dede..833f29f 100644 --- a/config/common/zsh/.zshrc +++ b/config/common/zsh/.zshrc @@ -7,7 +7,7 @@ if [[ -f "${HOME}/.note" ]]; then echo fi -tabs 2 +tabs 2,4,6,8,10,12,14,16,18,20 # instant prompt should stay on the top if [[ -r "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then @@ -75,6 +75,7 @@ zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} # source modules source "${HOME}/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" source "${HOME}/.local/git/zsh_modules/wd/wd.plugin.zsh" +source "${HOME}/.local/git/zsh_modules/diff-so-fancy/diff-so-fancy.plugin.zsh" export WD_CONFIG="${XDG_CONFIG_HOME}/wd_list" # cleaning diff --git a/install.sh b/install.sh index aec738d..e4f365f 100644 --- a/install.sh +++ b/install.sh @@ -37,7 +37,7 @@ else # zsh modules mkdir -p "${LOCAL_GIT_DIR}/zsh_modules" - for module in mfaerevaag/wd romkatv/powerlevel10k zdharma-continuum/fast-syntax-highlighting; do + for module in mfaerevaag/wd romkatv/powerlevel10k so-fancy/diff-so-fancy zdharma-continuum/fast-syntax-highlighting; do rm -rf "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}" git clone https://github.com/${module} "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}" done