Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

These are my configuration files for git, lazygit, delta, and bat. All tools use the Tokyo Night color theme.

Contents

  • config/.config/lazygit/ — the lazygit configuration
  • config/.config/delta/ — the delta color theme
  • config/.config/bat/ — the bat themes and syntax files
  • git/.gitconfig — the global git configuration

Dependencies

Tool Function
git version control
lazygit terminal UI for git
delta diff pager for git and lazygit
bat supplies the syntax theme to delta
neovim editor that lazygit opens

Note: On Debian and Ubuntu, the bat package installs the command as batcat. Use batcat in the commands below.

Installation

1. Install the dependencies

On macOS:

brew install lazygit git-delta bat neovim

On Arch Linux:

sudo pacman -S lazygit git-delta bat neovim

On Debian and Ubuntu:

sudo apt install git-delta bat neovim

If your distribution does not include the lazygit package, download lazygit from the releases page.

2. Clone the repository

git clone git@github.com:fastereder/dotfiles.git ~/Developer/dotfiles

3. Link the bat and delta configuration

If ~/.config/bat or ~/.config/delta already exists as a directory, remove it first. Otherwise ln -s places the symlink inside that directory instead of creating it, and the configuration is never read:

rm -rf ~/.config/bat ~/.config/delta
ln -s ~/Developer/dotfiles/config/.config/bat ~/.config/bat
ln -s ~/Developer/dotfiles/config/.config/delta ~/.config/delta

Check the result with ls -la ~/.config | grep -E 'bat|delta'. Both entries must be symlinks that point into this repository.

4. Link the git configuration

If you have a ~/.gitconfig file, move it to ~/.gitconfig.local:

mv ~/.gitconfig ~/.gitconfig.local

Then create the symlink:

ln -s ~/Developer/dotfiles/git/.gitconfig ~/.gitconfig

The git configuration includes ~/.gitconfig.local. Put your personal settings (name, email) in this file.

Notes:

  • The git configuration replaces HTTPS push URLs for github.com with SSH URLs.
  • It sets delta as the pager for git diff and git show, and as the filter for git add -p.
  • To verify, run git config --get core.pager. It must print delta. Do not use git config --global --get: git ignores include.* directives when you limit the lookup to a single file, so that form reports nothing for any included setting.

5. Link the lazygit configuration

On macOS, lazygit reads its configuration from ~/Library/Application Support/lazygit/config.yml. Create this symlink:

ln -s ~/Developer/dotfiles/config/.config/lazygit/config.yml ~/Library/Application\ Support/lazygit/config.yml

On Linux, lazygit reads its configuration from ~/.config/lazygit/config.yml. Remove any existing directory first, for the same reason as in step 3:

rm -rf ~/.config/lazygit
ln -s ~/Developer/dotfiles/config/.config/lazygit ~/.config/lazygit

Check the result with ls -la ~/.config/lazygit. It must be a symlink into this repository, not a directory. If it is a directory that contains a lazygit symlink, the link was created one level too deep and lazygit is reading an empty config.yml.

Notes:

  • The configuration hooks up delta through the git.diffRenderers key. Older lazygit versions called this key git.paging, then git.pagers. On a version that predates the current name, lazygit ignores the entry and shows raw git diffs. Upgrade lazygit rather than renaming the key back.
  • lazygit migrates renamed configuration keys on startup and writes the result back to config.yml. Because that file is a symlink into this repository, an upgrade can leave uncommitted changes here. Run git -C ~/Developer/dotfiles status after a lazygit upgrade and commit the migration.

6. Build the bat cache

This step is required, not optional. It registers the Tokyo Night theme for bat and delta:

bat cache --build

To make sure that the theme is available, run bat --list-themes. The list must contain tokyonight_night.

Without this step, delta cannot resolve the syntax-theme = tokyonight_night setting. It prints [bat warning]: Unknown theme 'tokyonight_night', using default. and falls back to its default syntax colors. The diff background colors still look correct, so the failure is easy to miss.

Rerun bat cache --build after every bat upgrade, since the cache is tied to the bat version.

Verifying the installation

ls -la ~/.config | grep -E 'bat|delta|lazygit'   # three symlinks into this repository
bat --list-themes | grep tokyonight_night        # theme is registered
git config --get core.pager                      # delta
git diff                                         # a Tokyo Night diff, rendered by delta

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors