fix(zsh): set autosuggest style before plugin load, tint paths

Set ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE before sourcing the plugin
so the style takes effect on first load. Add subtle green tint
to path syntax highlighting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-13 17:16:58 +00:00
parent 71748c2328
commit 84ac65a62f

View File

@@ -69,12 +69,12 @@ _dots_init_completion
_dots_load_plugins() { _dots_load_plugins() {
local plugin_dir="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" local plugin_dir="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#3C3C3C'
local f="$plugin_dir/zsh-autosuggestions/zsh-autosuggestions.zsh" local f="$plugin_dir/zsh-autosuggestions/zsh-autosuggestions.zsh"
[[ -f "$f" ]] && source "$f" [[ -f "$f" ]] && source "$f"
# Autosuggestion ghost text colour
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#3C3C3C'
# syntax-highlighting must be sourced last # syntax-highlighting must be sourced last
f="$plugin_dir/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" f="$plugin_dir/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
[[ -f "$f" ]] && source "$f" [[ -f "$f" ]] && source "$f"
@@ -86,7 +86,7 @@ _dots_load_plugins() {
ZSH_HIGHLIGHT_STYLES[alias]='fg=#2CB494' ZSH_HIGHLIGHT_STYLES[alias]='fg=#2CB494'
ZSH_HIGHLIGHT_STYLES[function]='fg=#2CB494' ZSH_HIGHLIGHT_STYLES[function]='fg=#2CB494'
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#F88C14' ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#F88C14'
ZSH_HIGHLIGHT_STYLES[path]='underline' ZSH_HIGHLIGHT_STYLES[path]='fg=#CCE0D0,underline'
ZSH_HIGHLIGHT_STYLES[globbing]='fg=#F88C14' ZSH_HIGHLIGHT_STYLES[globbing]='fg=#F88C14'
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=#7290B8' ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=#7290B8'
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=#7290B8' ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=#7290B8'