Browse Source

Add automatic install of zsh syntax highlighting

master
Taylor Bockman 2 years ago
parent
commit
aa4af08e18
  1. 18
      dotfiles/zsh/zshrc

18
dotfiles/zsh/zshrc

@ -50,14 +50,27 @@ fi
if [[ ! -d $HOME/.zsh ]]; then
echo "Installing zsh git completion scripts"
mkdir -p $HOME/.zsh
pushd
cd $HOME/.zsh
curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
cd $HOME
popd
fi
# Install zsh-syntax-highlighting if it doesn't exist
if [[ ! -d $HOME/.zsh/zsh-syntax-highlighting ]]; then
echo "Installing zsh syntax highlighting"
pushd
cd $HOME/.zsh
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
popd
fi
zstyle ':completion:*:*:git:*' script $HOME/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
@ -71,5 +84,8 @@ source $symlink_dir/exports.zsh
source $symlink_dir/initializations.zsh
source $symlink_dir/ps1.zsh
# ZSH syntax highlighting must be sourced last
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# ------------------------------ END SETUP ------------------------------ #

Loading…
Cancel
Save