zsh-users / zsh-history-substring-search

🐠 ZSH port of Fish history search (up arrow)
2.61k stars 156 forks source link

Highlighting doesn't work when using both marlonrichert/zsh-autocomplete and zsh-users/zsh-syntax-highlighting #145

Open kinland opened 1 year ago

kinland commented 1 year ago

There appears to be a compatibility issue between zsh-history-substring-search and these modules:

It seems that when I try to enable all 4 plugins, syntax highlighting doesn't work with zsh-history-substring-search. However, disabling either zsh-autocomplete or zsh-syntax-highlighting causes highlighting to function properly.

Working (listed order is load order):

Not working (changing the order doesn't seem to help):

Incidentally, replacing zsh-syntax-highlighting with fast-syntax-highlighting seems to make things work. Highlighting is a little different, but close.

Possibly related to https://github.com/marlonrichert/zsh-autocomplete/issues/517

Caellian commented 11 months ago

Just having zsh-autosuggestions + zsh-history-substring-search (in any order) breaks autosuggestion highlighting.

All of these are trying to do the same thing "modify styling on the current line" and I think it's near impossible to coordinate them to all work together without merging them into a single plugin.

Based on the fact that people are suggesting to set the HIGHLIGHT_STYLE to white, it seems like it's not an obscure issue.

hugopeek commented 7 months ago

This same thing happened to me when configuring a new workstation, while on the old unit it was still working.. So I backtracked through both the autosuggestions and history-substring repos and did a few checkouts to earlier commits.

It seems the issue was introduced in this repository, with commit https://github.com/zsh-users/zsh-history-substring-search/commit/b4fb93de0e911ae0c09685d9b0cf0602d88b7156. If I revert to the commit before (563a5511655f2d63b248538a4637110263d20c7b), the behaviour is back to normal again.