Add zsh-syntax-highlighting plugin and update highlight styles in zsh configuration

This commit is contained in:
Philip Henning 2025-08-27 16:31:41 +02:00
parent 5b301a5c6d
commit 86162eafcf
2 changed files with 7 additions and 1 deletions

View file

@ -16,6 +16,7 @@ actions:
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-autosuggestions ]] && git clone https://github.com/zsh-users/zsh-autosuggestions ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-autosuggestions || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-autosuggestions ]] && git clone https://github.com/zsh-users/zsh-autosuggestions ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-autosuggestions || echo "do nothing" >/dev/null
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions ]] && git clone https://github.com/zsh-users/zsh-completions.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions ]] && git clone https://github.com/zsh-users/zsh-completions.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions || echo "do nothing" >/dev/null
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-ssh ]] && git clone https://github.com/sunlei/zsh-ssh ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-ssh || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-ssh ]] && git clone https://github.com/sunlei/zsh-ssh ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-ssh || echo "do nothing" >/dev/null
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-syntax-highlighting ]] && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-syntax-highlighting || echo "do nothing" >/dev/null
powerlevel9k-theme: | powerlevel9k-theme: |
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes || echo "do nothing" >/dev/null
[[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel9k ]] && git clone https://github.com/bhilburn/powerlevel9k.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel9k || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel9k ]] && git clone https://github.com/bhilburn/powerlevel9k.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel9k || echo "do nothing" >/dev/null

View file

@ -77,7 +77,11 @@ COMPLETION_WAITING_DOTS="true"
ZOXIDE_CMD_OVERRIDE="cd" ZOXIDE_CMD_OVERRIDE="cd"
# zsh-autosuggestions - https://github.com/zsh-users/zsh-autosuggestions?tab=readme-ov-file#suggestion-highlight-style # zsh-autosuggestions - https://github.com/zsh-users/zsh-autosuggestions?tab=readme-ov-file#suggestion-highlight-style
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ffaa33,bold" ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="bold"
# zsh-syntax-highlighting - unknown tokens / errors
typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=black,bg=red,bold'
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
@ -115,6 +119,7 @@ plugins=(
zsh-autosuggestions zsh-autosuggestions
zsh-navigation-tools zsh-navigation-tools
zsh-ssh zsh-ssh
zsh-syntax-highlighting
{%@@ if distro == 'macos' @@%} # Mac specifics {%@@ if distro == 'macos' @@%} # Mac specifics
brew brew
iterm2 iterm2