Skip to content

Commit b2a98c8

Browse files
committed
added highlight submodule
1 parent 295447c commit b2a98c8

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "pure"]
22
path = pure
33
url = [email protected]:hubeRsen/pure.git
4+
[submodule "terminal/hightlight"]
5+
path = terminal/hightlight
6+
url = [email protected]:zsh-users/zsh-syntax-highlighting.git

terminal/hightlight

Submodule hightlight added at 8d5afe4

terminal/hightlight.zsh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Integrates zsh-syntax-highlighting into Prezto.
3+
#
4+
# Authors:
5+
# Sorin Ionescu <[email protected]>
6+
#
7+
8+
# Return if requirements are not found.
9+
if ! zstyle -t ':prezto:module:syntax-highlighting' color; then
10+
return 1
11+
fi
12+
13+
# Source module files.
14+
source "${0:h}/highlight/zsh-syntax-highlighting.zsh" || return 1
15+
16+
# Set highlighters.
17+
zstyle -a ':prezto:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS'
18+
if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then
19+
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
20+
fi
21+
22+
# Set highlighting styles.
23+
typeset -A syntax_highlighting_styles
24+
zstyle -a ':prezto:module:syntax-highlighting' styles 'syntax_highlighting_styles'
25+
for syntax_highlighting_style in "${(k)syntax_highlighting_styles[@]}"; do
26+
ZSH_HIGHLIGHT_STYLES[$syntax_highlighting_style]="$syntax_highlighting_styles[$syntax_highlighting_style]"
27+
done
28+
unset syntax_highlighting_style{s,}

zsh/zshrc.symlink

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ done
2222
# load everything but the path and completion files
2323
for file in ${${config_files:#*/path.zsh}:#*/completion.zsh}
2424
do
25+
echo "loading $file"
2526
source $file
2627
done
2728

0 commit comments

Comments
 (0)