zsh-syntax-highlighting

Dracula

Dark theme for zsh-syntax-highlighting and 271+ apps

StarFork

zsh-syntax-highlighting Theme Preview

6,675 views

zsh-syntax-highlighting

Install using Git

If you are a git user, you can install the theme and keep up to date by cloning the repo:

git clone https://github.com/dracula/zsh-syntax-highlighting.git

Install manually

Download using the GitHub .zip download option and unzip them.

Activating theme

  1. Before being able to use the Dracula theme for zsh-syntax-highlighting, you must first have downloaded and installed the zsh-syntax-highlighting utility (and be using zsh).

  2. Copy the contents of the Dracula zsh-syntax-highlighting file, and paste into your zshrc file, likely at ~/.zshrc.

    • Note: If you installed zsh-syntax-highlighting via git, or site wide, be sure to paste the contents of the file before the following line in your ~/.zshrc file:

      # ...
      source /some/path/to/your/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
      # ...
      
    • Note: If you installed zsh-syntax-highlighting via a plugin manager, be sure to paste the contents of the file before you activate the utility via it's plugin invocation.

  3. Start a new zsh session: exec zsh and confirm it's working.

Implementation

This theme attempts to cover all possible zsh-syntax-highlighting options for the main highlighter. The coloring was implemented/modelled after the official Dracula color specification as much as logically possible.

As such, the theme is grouped by Dracula spec section; Each section in the spec is 1:1 with a ## <header> in the theme file. For settings that didn't seem to fall under any of the Dracula spec, they are under the ## No category relevant in spec section.

Within a section, the options occur in the same order they do on the main highlighter doc page.

Accompanying Screnshot Prompt

Though not related to this theme nor included as a specific Dracula offering, the prompt in the screenshot is typewritten: "A minimal zsh prompt". Relevant ~/.zshrc settings are so:

# Typwritten: https://typewritten.dev/#/installation; Dracula compliment, purple based
ZSH_THEME="typewritten"

export TYPEWRITTEN_SYMBOL="λ "
export DRACULA_TYPEWRITTEN_COLOR_MAPPINGS="primary:#d5ccff;secondary:#9580ff;info_neutral_1:#d0ffcc;info_neutral_2:#ffffcc;info_special:#ff9580;info_negative:#ff5555;notice:#ffff80;accent:#d5ccff"
export TYPEWRITTEN_COLOR_MAPPINGS="${DRACULA_TYPEWRITTEN_COLOR_MAPPINGS}"
export TYPEWRITTEN_PROMPT_LAYOUT="half_pure"

Stay up to date

Get updates about this theme and more. 5,986 people enjoy it.

Contributors

This theme wouldn't exist without these people. Wanna help too? Check the repository on GitHub.

  • bigpick
  • zenorocha
  • luxonauta
Edit this documentation on GitHub.

Made with by Zeno Rocha
under MIT license