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.
This commit is contained in:
Ivan Smirnov 2018-08-20 16:49:35 -07:00 committed by GitHub
parent db6cac391b
commit 33315cc447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,11 @@ To activate an highlighter, add it to the `ZSH_HIGHLIGHT_HIGHLIGHTERS` array in
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor) ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
By default, `$ZSH_HIGHLIGHT_HIGHLIGHTERS` is unset and only the `main` 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 How to tweak highlighters