From 86162eafcf680fc8f6183096c50ba9fd2fd9c38b Mon Sep 17 00:00:00 2001 From: shokinn Date: Wed, 27 Aug 2025 16:31:41 +0200 Subject: [PATCH] Add zsh-syntax-highlighting plugin and update highlight styles in zsh configuration --- config.yaml | 1 + dotfiles/zshrc | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index ef60cdb..8f2f8eb 100644 --- a/config.yaml +++ b/config.yaml @@ -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-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-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: | [[ ! -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 diff --git a/dotfiles/zshrc b/dotfiles/zshrc index e284ced..80c46e8 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -77,7 +77,11 @@ COMPLETION_WAITING_DOTS="true" ZOXIDE_CMD_OVERRIDE="cd" # 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/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ @@ -115,6 +119,7 @@ plugins=( zsh-autosuggestions zsh-navigation-tools zsh-ssh + zsh-syntax-highlighting {%@@ if distro == 'macos' @@%} # Mac specifics brew iterm2