zsh-autosuggestions
                                
                                 zsh-autosuggestions copied to clipboard
                                
                                    zsh-autosuggestions copied to clipboard
                            
                            
                            
                        ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE
Describe the bug
let's assume that we want to type ls -lha ~/Desktop if I type the whole command then everything works as expected, but if I type "ls -lh" and then accept the suggestion, everything after "ls -lh" is going to have the suggestions color (Greyed out or whatever color I choose).
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=4'
Desktop
MacOS Sonoma
Yup same thing here, if anyone has a workaround that'd be great
Also happens on Arch
I have this set in my .zshrc:
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8"
This is what happens to me in neovim+tmux:
This is what happens when using only tmux
I'm not sure if this issue is related but it's really hard to use the plugin 😢.
setting export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#f1d687" in my ~/.zshrc worked for me, it is a similar colour to the default.
I had the same problem with
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#aaa"
It works with full color hex
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#aaaaaa"
Problem seems to be that when fg=7 (or anything below 8, at least in my terminal) is added to region_highlight (which is doing the highlighting), it is implicitly replaced by the color name. When undoing the highlighting, this plugin searches for fg=7 exactly to replace it, which then fails.
It's likely more robust to use the memo property for this.
EDIT: memo seems to be a ZSH 5.9 feature (the latest version at the time of writing), so not sure whether it makes sense to bump the version requirement to 5.9 for this