From 13c1c1996d2b4ce4f78edc5a81c3a40884240174 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 14 Jun 2012 17:20:57 -0400 Subject: [PATCH] Add a zstyle to set the syntax highlighter --- modules/syntax-highlighting/init.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/syntax-highlighting/init.zsh b/modules/syntax-highlighting/init.zsh index bb77931..88ec7b4 100644 --- a/modules/syntax-highlighting/init.zsh +++ b/modules/syntax-highlighting/init.zsh @@ -7,6 +7,11 @@ if zstyle -t ':omz:module:syntax-highlighting' color; then source "${0:h}/external/zsh-syntax-highlighting.zsh" - ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor) + + # Set the highlighters. + zstyle -a ':omz:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS' + if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then + ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets cursor) + fi fi