zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.43k stars 1.85k forks source link

conflict with syntax-highlighting plug #673

Open day0n opened 2 years ago

day0n commented 2 years ago

Describe the bug

Screenshots

Desktop

Additional context

this doesn't work when I use syntax-highlight plug.

scrubmx commented 2 years ago

I have the same issue:

I'm also setting the color in my .zshrc file:

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=242"
jimmyn commented 2 years ago

I have the same issue

jirutka commented 2 years ago

Me too (on Alpine Linux, without OhMyZsh).

pawel-omniaz commented 2 years ago

Same here :/

DimitriGilbert commented 2 years ago

I have an identical problem, One thing though, if I connect to a server through ssh, highlight appears properly...

ih8ms commented 2 years ago

I have the very same behaviour as described by @DimitriGilbert However, I observed this only after updating to Ubuntu 22.04. I wonder if there's a connection.

ih8ms commented 2 years ago

I was able to fix the issue by updating both autosuggestions and syntax-highlighting to their latest versions from GitHub (just cloned the repos).

pawel-omniaz commented 2 years ago

Yep, I can confirm - updating both plugins fixed it for me too on Mac OS :) Thanks! I thought those plugins are updated automatically by Oh My Zsh or something ;)

DimitriGilbert commented 2 years ago

same thing, and just like @pawel-omniaz , I didn't even think I was in charge of the update.

shotexa commented 2 years ago

Had the same issue, removed plugins from ~/.oh-my-zsh/custom/plugins/ and then re-installed them via

Syntax highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
findtravishere commented 2 years ago

this bug was driving me crazy and i was changing the autosuggest highlight style to so many different colours to test it out and i couldnt fix it properly until i followed @shotexa's instructions above. my main issue was i had no idea where my old plugins were being installed to so after reinstalling them it was still pointing to the old ones that weren't patched.

just in case others somehow have it installed in another directory similar to mine even when running the default git clone commands, this was my path i did rm -rf with to remove them completely and to activate the source for zsh-syntax-highlighting with at the end of your .zshrc file.

source /Users/CHANGE_THIS_WITH_YOUR_USER/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

jirutka commented 1 year ago

This problem persists on Zsh 5.8.1 even with the latest revision of both plugins but is no longer present on Zsh 5.9.