From 33315cc4477adf04f8120dab64e93c4b32e5af94 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Mon, 20 Aug 2018 16:49:35 -0700 Subject: [PATCH] Add instructions about initializing variable Many users use modular configuration loaders for zshrc. Adding a note to users explaining how to define ZSH_HIGHLIGHT_HIGHLIGHTERS before sourcing zsh-syntax-highlighting. The typeset is important, since simply setting the variable doesn't have the desired effect. --- docs/highlighters.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/highlighters.md b/docs/highlighters.md index 642d2bd..4472460 100644 --- a/docs/highlighters.md +++ b/docs/highlighters.md @@ -27,7 +27,11 @@ To activate an highlighter, add it to the `ZSH_HIGHLIGHT_HIGHLIGHTERS` array in ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor) By default, `$ZSH_HIGHLIGHT_HIGHLIGHTERS` is unset and only the `main` -highlighter is active. +highlighter is active. + +If you would like to set this variable before +sourcing zsh-syntax-highlighting, initialize it first with: +`typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS` How to tweak highlighters