arborium-theme 1.2.1

Theme support for arborium syntax highlighting
Documentation

arborium-theme

Theme and highlight definitions for arborium syntax highlighting.

This crate provides:

  • Highlight definitions: Mapping from tree-sitter capture names to short HTML tags (e.g., keyword -> <a-k>)
  • Theme types: Theme, Color, Style for representing syntax highlighting themes
  • Built-in themes: 24 popular color schemes ready to use

Usage

use arborium_theme::{Theme, builtin, HIGHLIGHTS};

// Use a built-in theme
let theme = builtin::catppuccin_mocha();

// Generate CSS for the theme
let css = theme.to_css("[data-theme=\"mocha\"]");

// Access highlight definitions
for def in HIGHLIGHTS {
    println!("{} -> <a-{}>", def.name, def.tag);
}

Built-in Themes

This crate includes 24 themes from popular color schemes. We are grateful to the original theme authors:

Theme Source
Ayu Dark ayu-theme/ayu-colors
Ayu Light ayu-theme/ayu-colors
Catppuccin Frappe catppuccin/catppuccin
Catppuccin Latte catppuccin/catppuccin
Catppuccin Macchiato catppuccin/catppuccin
Catppuccin Mocha catppuccin/catppuccin
Dracula draculatheme.com
ef-melissa-dark protesilaos.com/emacs/ef-themes
GitHub Dark primer/github-vscode-theme
GitHub Light primer/github-vscode-theme
Gruvbox Dark morhetz/gruvbox
Gruvbox Light morhetz/gruvbox
Kanagawa Dragon rebelot/kanagawa.nvim
Light Owl sdras/night-owl-vscode-theme
Lucius Light jonathanfilip/vim-lucius
Melange Dark savq/melange-nvim
Melange Light savq/melange-nvim
Monokai Pro monokai.pro
Nord nordtheme.com
One Dark atom/one-dark-syntax
Rose Pine Moon rosepinetheme.com
Solarized Dark ethanschoonover.com/solarized
Solarized Light ethanschoonover.com/solarized
Tokyo Night enkia/tokyo-night-vscode-theme

License

This crate is licensed under MIT OR Apache-2.0.

The built-in themes are adaptations of color schemes from their respective projects. Please see each project's repository for their specific licensing terms.