Skip to content

Commit

Permalink
Use delta as git/lazygit pager is much nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Nov 19, 2024
1 parent 961c682 commit e702ea0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .lazygit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git:
paging:
colorArg: always
pager: delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"
12 changes: 12 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set dotenv-load

export PROJECT_ROOT := justfile_directory()
export HOMEBREW_NO_AUTO_UPDATE := "1"
export XDG_CONFIG_HOME := home_directory() / ".config"

default:
just --list
Expand Down Expand Up @@ -463,3 +464,14 @@ llm-proxy *PARAMS:
# a zsh that inherits .env
zsh:
zsh

prep-delta:
which delta || brew install git-delta
git config --global core.pager "delta"
git config --global interactive.diffFilter "delta --color-only"
# use n and N to move between diff sections
git config --global delta.navigate true
git config --global delta.dark true
git config --global merge.conflictStyle zdiff3
mkdir -p ~/.config/lazygit
cp -f .lazygit.yml ~/.config/lazygit/config.yml

0 comments on commit e702ea0

Please sign in to comment.