zsh-users / zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.
github.com/zsh-users/zsh-syntax-highlighting
BSD 3-Clause "New" or "Revised" License
20k stars 1.33k forks source link

Change colors? #841

Closed AndreKucharzyk closed 2 years ago

AndreKucharzyk commented 2 years ago

Is there a way to change the colours of highlighting? My current colors are not that pleasing.

Colors

Waxxx333 commented 2 years ago

I did this: cd zsh-syntax-highlighting && find . -type f -exec sed -i 's/\<green\>/blue/g' {} \; Obviously change "blue" to your desired color. You can use hex colors too: find . -type f -exec sed -i 's/\<green\>/"#FF6329"/g' {} \;

danielshahaf commented 2 years ago

See the documentation about ZSH_HIGHLIGHT_STYLES, and your terminal emulator's color palette.

polatouche6 commented 2 years ago

there are some config about ZSH_HIGHLIGHT_STYLES inzsh-syntax-highlighting/highlighters/main/main-highlighter.zsh. you can set it in ~/.zshrc to change color. such as change ZSH_HIGHLIGHT_STYLES[arg0]

ZSH_HIGHLIGHT_STYLES[arg0]='fg=yellow'

I did this: cd zsh-syntax-highlighting && find . -type f -exec sed -i 's/\<green\>/blue/g' {} \; Obviously change "blue" to your desired color. You can use hex colors too: find . -type f -exec sed -i 's/\<green\>/"#FF6329"/g' {} \;

danielshahaf commented 2 years ago

Yeah, that's right. Again, see the documentation for details.