Skip to content

Commit 1686afa

Browse files
committed
Re-enabled zsh-syntax-highlighting
Figured out what was causing the problem(s). I reported it at zsh-users/zsh-syntax-highlighting#387 I submitted a pull request at zsh-users/zsh-autosuggestions#206
1 parent 184a5d2 commit 1686afa

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

zsh/startup/0plugins.zsh

+15-14
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,28 @@ if ! zgen saved; then
4343
# Completion generator
4444
zgen load RobSis/zsh-completion-generator
4545

46-
# Add Fish shell like syntax highlighting for ZSH
47-
if false; then
48-
# With zsh-syntax-highlighting and zsh-autosuggestions both loaded
49-
# then history-incremental-pattern-search-backward doesn't work:
50-
# it only works for the first (random) few history items, then stops as if
51-
# my history is gone.
46+
if is-at-least 5.0; then
47+
# Add Fish shell like syntax highlighting for ZSH
5248
zgen load zsh-users/zsh-syntax-highlighting
53-
fi
5449

55-
# Add Fish-like autosuggestions to your ZSH
56-
if is-at-least 5.0; then
50+
# Add Fish-like autosuggestions to your ZSH
5751
zgen load zsh-users/zsh-autosuggestions
58-
# Fixes paste being slow.
59-
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
60-
61-
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=( end-of-line vi-end-of-line vi-add-eol )
62-
ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS+=( forward-char vi-forward-char )
6352
fi
6453

6554
# Save it all to init script
6655
zgen save
6756
fi
6857

58+
# Fixes paste being slow.
59+
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
60+
61+
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=( end-of-line vi-end-of-line vi-add-eol )
62+
ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS+=( forward-char vi-forward-char )
63+
# Workaround until it's fixed in zsh-autosuggest:
64+
# https://github.com/zsh-users/zsh-autosuggestions/pull/206
65+
typeset -ar ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(
66+
"${ZSH_AUTOSUGGEST_IGNORE_WIDGETS[@]}"
67+
zle-isearch-update
68+
)
69+
6970
# EOF

0 commit comments

Comments
 (0)