zsh-users / zsh-autosuggestions

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

Autosuggestion's fg color changes to white after typing a few characters. #660

Closed JDeepD closed 2 years ago

JDeepD commented 2 years ago

Describe the bug

By default, the autosuggestions appear in grey. But after typing one or two characters, the fg of autosuggestion changes to white. This happens even when changing the ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE variable.

To Reproduce

Steps to reproduce the behavior:

If you are not able to reproduce it by running zsh -df and sourcing the plugin manually, it means there that the issue is caused by something in your local config file(s). Temporarily comment out or remove sections of your config and restart zsh until you narrow down exactly what is causing the issue

This does not happen when I followed the above steps. But how can my local config be wrong when I didn't even touch it? I have not even customised the bg/fg colors. Just using the default ones.

Expected behavior

Autosuggestions should always be grey.

Screenshots

https://user-images.githubusercontent.com/64089730/153868225-2594bc9f-1d87-44f7-97a3-5df261b6450b.mp4

https://user-images.githubusercontent.com/64089730/153868234-7acfe648-96c1-4434-99c3-670014066a65.mp4

Desktop

Additional context

It was working perfectly fine yesterday. It happened when I restarted my laptop today.

ericfreese commented 2 years ago

People are reporting problems with the suggestion coloring with the new 5.8.1 zsh version on #603. I bet this is related.

JDeepD commented 2 years ago

@ericfreese I tried some things to fix this:

Try updating both zsh-syntax-highlighting and zsh-autosuggestions.

For me, I just removed antigen and manually cloned/sourced both the plugins since it was much simpler. It fixed the issue.

I should probably close this issue now.