Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grayed out with latest zsh-syntax-highlighting 0.7.1. #9

Open
RoyRao2333 opened this issue Nov 16, 2022 · 3 comments
Open

Grayed out with latest zsh-syntax-highlighting 0.7.1. #9

RoyRao2333 opened this issue Nov 16, 2022 · 3 comments

Comments

@RoyRao2333
Copy link

Describe the Issue
Where I put it:
image

In .zshrc:
image

Expected behavior
Without theme:
image
image

Screenshots
With theme installed:
image
image

@siliconwitch
Copy link

I'm also getting this. Possibly due to Terminal.app not supporting the colors?

@DarkaMaul
Copy link

Indeed, that was the problem.

I solved it by replacing every #hexvalues in the file with the closest xterm 256 color.

Here is the modified file if anyone is interested.

# Dracula Theme (for zsh-syntax-highlighting)
# Modified to be compatible with Terminal.app on MacOS
# https://github.com/zenorocha/dracula-theme
#
# Copyright 2021, All rights reserved
#
# Code licensed under the MIT license
# http://zenorocha.mit-license.org
#
# @author George Pickering <@bigpick>
# @author Zeno Rocha <[email protected]>
# Paste this files contents inside your ~/.zshrc before you activate zsh-syntax-highlighting
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main cursor)
typeset -gA ZSH_HIGHLIGHT_STYLES
# Default groupings per, https://spec.draculatheme.com, try to logically separate
# possible ZSH_HIGHLIGHT_STYLES settings accordingly...?
#
# Italics not yet supported by zsh; potentially soon:
#    https://github.com/zsh-users/zsh-syntax-highlighting/issues/432
#    https://www.zsh.org/mla/workers/2021/msg00678.html
# ... in hopes that they will, labelling accordingly with ,italic where appropriate
#
# Main highlighter styling: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md
#
## General
### Diffs
### Markup
## Classes
## Comments
ZSH_HIGHLIGHT_STYLES[comment]='fg=61'
## Constants
## Entitites
## Functions/methods
ZSH_HIGHLIGHT_STYLES[alias]='fg=84'
ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=84'
ZSH_HIGHLIGHT_STYLES[global-alias]='fg=84'
ZSH_HIGHLIGHT_STYLES[function]='fg=84'
ZSH_HIGHLIGHT_STYLES[command]='fg=84'
ZSH_HIGHLIGHT_STYLES[precommand]='fg=84,italic'
ZSH_HIGHLIGHT_STYLES[autodirectory]='fg=215,italic'
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=215'
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=215'
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=141'
## Keywords
## Built ins
ZSH_HIGHLIGHT_STYLES[builtin]='fg=117'
ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=117'
ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=117'
## Punctuation
ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=212'
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]='fg=231'
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]='fg=231'
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]='fg=231'
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]='fg=212'
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=212'
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=212'
## Serializable / Configuration Languages
## Storage
## Strings
ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]='fg=228'
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]='fg=228'
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=228'
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]='fg=203'
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=228'
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]='fg=203'
ZSH_HIGHLIGHT_STYLES[rc-quote]='fg=228'
## Variables
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=231'
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]='fg=203'
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=231'
ZSH_HIGHLIGHT_STYLES[assign]='fg=231'
ZSH_HIGHLIGHT_STYLES[named-fd]='fg=231'
ZSH_HIGHLIGHT_STYLES[numeric-fd]='fg=231'
## No category relevant in spec
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=203'
ZSH_HIGHLIGHT_STYLES[path]='fg=231'
ZSH_HIGHLIGHT_STYLES[path_pathseparator]='fg=212'
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=231'
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]='fg=212'
ZSH_HIGHLIGHT_STYLES[globbing]='fg=231'
ZSH_HIGHLIGHT_STYLES[history-expansion]='fg=141'
#ZSH_HIGHLIGHT_STYLES[command-substitution]='fg=?'
#ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]='fg=?'
#ZSH_HIGHLIGHT_STYLES[process-substitution]='fg=?'
#ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]='fg=?'
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]='fg=203'
ZSH_HIGHLIGHT_STYLES[redirection]='fg=231'
ZSH_HIGHLIGHT_STYLES[arg0]='fg=231'
ZSH_HIGHLIGHT_STYLES[default]='fg=231'
ZSH_HIGHLIGHT_STYLES[cursor]='standout'

@RoyRao2333
Copy link
Author

@DarkaMaul

I'll test it out later but thanks for the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants