add char-level diff highlighter and git setup

This commit is contained in:
2026-09-13 10:59:41 -05:00
parent bfebd7ed87
commit a76862caaf
+13
View File
@@ -60,6 +60,7 @@ sudo rm -rf /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
rm nvim-linux-x86_64.tar.gz
echo 'export PATH="$PATH:/opt/nvim-linux-x86_64/bin"' | tee -a "$HOME/.bashrc"
git config --global core.editor "nvim"
# Neovim config
git clone https://gitea.jovan04.com/evan/neovim-config "$HOME/.config/nvim"
@@ -124,6 +125,18 @@ chmod 755 /usr/local/bin/def
# Artha (WordNet dictionary)
sudo apt-get install -y artha
# diff-highlight (hightlights characters changed within line)
# from https://github.com/git/git/tree/master/contrib/diff-highlight
# see https://stackoverflow.com/a/15149253
sudo curl https://raw.githubusercontent.com/git/git/fd99e2bda0ca6a361ef03c04d6d7fdc7a9c40b78/contrib/diff-highlight/diff-highlight -o /usr/local/bin/diff-highlight
sudo chown $INSTALL_USER:$INSTALL_USER /usr/local/bin/diff-highlight
chmod 755 /usr/local/bin/diff-highlight
# set it up as git's diff viewer
git config --global pager.log 'diff-highlight | less'
git config --global pager.show 'diff-highlight | less'
git config --global pager.diff 'diff-highlight | less'
git config --global interactive.diffFilter diff-highlight
# qpdf (pdf manipulation)
sudo apt-get install -y qpdf