This cookbook reproduces a clean, side-by-side diff setup themed in Tokyo Night, applied consistently in two places: the terminal (every git diff, git show, git log -p, and merge conflict) and lazygit's diff panes. It uses delta as the pager, with custom add/remove backgrounds, colored line-number gutters, and styled file and hunk headers, so reviews read the same way whether you are on the command line or driving lazygit.
- macOS with Homebrew.
- A true-color (24-bit) terminal, since the theme relies on exact hex colors.
- git and (optionally) lazygit already installed.
brew install git-deltaOptional, only if you want to add custom syntax-highlighting themes for delta later:
brew install batVerified versions at the time of writing:
git-delta0.19.2bat0.26.1
The block below is what lands in ~/.gitconfig. The key groups are annotated:
syntax-themepicks the base code-coloring theme (TwoDark) that delta tints on top of.- The
*-styleadd/remove pairs set the+/-line backgrounds, with the*-emph-*variants used for the changed words within a line. - The
line-numbers-*keys color the left/right line-number gutters (green for added, red for removed, muted for context). file-*andhunk-header-*keys style the file path banner and the hunk separators.blame-paletteis the four-stop background ramp used bydelta --blame, ordered darkest to lightest.
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = zdiff3
[delta]
navigate = true
side-by-side = true
line-numbers = true
syntax-theme = TwoDark
# +/- LINE BACKGROUNDS (TOKYO NIGHT)
minus-style = syntax "#37222c"
minus-emph-style = syntax "#713137"
plus-style = syntax "#20303b"
plus-emph-style = syntax "#2c5a47"
zero-style = syntax
# LINE-NUMBER GUTTERS
line-numbers-minus-style = "#f7768e"
line-numbers-plus-style = "#9ece6a"
line-numbers-zero-style = "#737aa2"
line-numbers-left-style = "#737aa2"
line-numbers-right-style = "#737aa2"
# FILE + HUNK HEADERS
file-style = "#7aa2f7" bold
file-decoration-style = "#3b4261" ul
hunk-header-style = "#7dcfff" bold
hunk-header-decoration-style = "#3b4261" box
hunk-header-line-number-style = "#bb9af7"
# BLAME PALETTE (DARKEST -> LIGHTEST)
blame-palette = "#1a1b26" "#16161e" "#292e42" "#414868"To apply the same configuration programmatically, run:
git config --global core.pager "delta"
git config --global interactive.diffFilter "delta --color-only"
git config --global merge.conflictstyle "zdiff3"
git config --global delta.navigate true
git config --global delta.side-by-side true
git config --global delta.line-numbers true
git config --global delta.syntax-theme "TwoDark"
git config --global delta.minus-style "syntax #37222c"
git config --global delta.minus-emph-style "syntax #713137"
git config --global delta.plus-style "syntax #20303b"
git config --global delta.plus-emph-style "syntax #2c5a47"
git config --global delta.zero-style "syntax"
git config --global delta.line-numbers-minus-style "#f7768e"
git config --global delta.line-numbers-plus-style "#9ece6a"
git config --global delta.line-numbers-zero-style "#737aa2"
git config --global delta.line-numbers-left-style "#737aa2"
git config --global delta.line-numbers-right-style "#737aa2"
git config --global delta.file-style "#7aa2f7 bold"
git config --global delta.file-decoration-style "#3b4261 ul"
git config --global delta.hunk-header-style "#7dcfff bold"
git config --global delta.hunk-header-decoration-style "#3b4261 box"
git config --global delta.hunk-header-line-number-style "#bb9af7"
git config --global delta.blame-palette "#1a1b26 #16161e #292e42 #414868"Find the config directory with lazygit --print-config-dir. On macOS the file lives at ~/Library/Application Support/lazygit/config.yml. Put this in it:
git:
pagers:
- colorArg: always
pager: delta --paging=never --side-by-side --line-numbers
gui:
# COLLAPSE UNFOCUSED LEFT PANES (BRANCHES ONLY GROWS WHEN FOCUSED)
expandFocusedSidePanel: true
theme:
# READABLE SELECTION HIGHLIGHT (TOKYO NIGHT SELECTION BLUE + LIGHT TEXT)
selectedLineBgColor:
- "#2e3c64"
selectedRangeBgColor:
- "#2e3c64"
activeBorderColor:
- "#7aa2f7"
- bold
inactiveBorderColor:
- "#737aa2"A couple of notes on the choices:
gui.expandFocusedSidePanel: truekeeps the unfocused left-hand panels compact and only expands the one you are currently in, so the diff view stays wide.- The theme colors mirror the terminal setup: a Tokyo Night selection blue (
#2e3c64) for the highlighted line and range, the same accent blue (#7aa2f7) for the active pane border, and a muted blue-gray (#737aa2) for inactive borders, so focus is obvious without being loud. delta --paging=neveris important inside lazygit so delta renders the diff but hands paging back to lazygit's own scroller.
- Relaunch lazygit so it re-reads
config.yml. - In a terminal, run
git diff(orgit show) in any repo with changes; you should see the side-by-side Tokyo Night diff. UsenandNto navigate between files thanks todelta.navigate.
git log has no native --watch, and the obvious workaround (a while clear; git log; sleep 2 loop) flickers badly because it wipes and repaints the whole screen on every tick. viddy is a watch reimplemented in Rust that solves this with differential cell rendering: it only repaints the cells that actually changed, so the view stays steady, and its -d flag highlights whatever just changed. These two shell aliases (full file: shell-git-aliases.sh) give a static log and a live one.
Install viddy:
brew install viddyVerified version at the time of writing:
viddy1.3.1
Add these to ~/.zshrc:
alias log='git log --compact-summary --relative-date --graph'
alias logw='viddy -d -n 2 "git -c core.pager=cat log -n 200 --compact-summary --relative-date --graph --color=always"'logis a compact, graphed history with relative dates, rendered through the delta pager from section 2.logwwatches that same log live, refreshing every 2 seconds (-n 2) with changed cells highlighted (-d). The-n 200flag caps the output at 200 commits so git does bounded work on every refresh tick, while still giving viddy a deep enough buffer to scroll through.
Three gotchas the logw alias has to work around, the first two because the command runs inside viddy rather than directly in your shell:
- Disable the pager (
git -c core.pager=cat ..., or--no-pager). Otherwise git launches its pager and the command hangs under viddy instead of returning output. - Force
--color=always. viddy's output is not a TTY, so git would strip color by default; making color unconditional keeps the graph and delta-style coloring visible. - Use git's own
-n 200rather than piping to| head -40. Piping toheadtruncates the captured output to 40 lines before viddy even sees it, so there is nothing deeper to scroll into. Letting git bound the commit count with-n 200keeps the full 200-commit buffer intact and scrollable.
A few readability knobs you can adjust to taste:
- Context line-number color:
delta.line-numbers-zero-styleis#737aa2. For dimmer context numbers try#565f89, or for brighter ones#a9b1d6. - Selection background in lazygit:
selectedLineBgColor/selectedRangeBgColorare#2e3c64. A subtler highlight is#283457; a stronger one is#3b4261. - Inactive border and tab color in lazygit:
inactiveBorderColoris#737aa2. Drop it to#3b4261for near-invisible borders, or raise it to#9aa5cefor more contrast.
Maintained automatically by an AI agent. Last verified: <date>.