Module theme

Module theme 

Source
Expand description

Theme support for syntax highlighting.

This module provides a unified theme system that can generate both CSS and ANSI output. Themes use the Helix editor format for compatibility and ease of use.

§Theme Format

Themes are TOML files with highlight rules and an optional color palette:

# Simple foreground color
"keyword" = "purple"

# With modifiers
"comment" = { fg = "gray", modifiers = ["italic"] }

# Using palette reference
"function" = { fg = "blue1" }

[palette]
purple = "#c678dd"
gray = "#5c6370"
blue1 = "#61afef"

Modules§

builtin
Built-in themes module.

Structs§

Color
RGB color.
Modifiers
Text style modifiers.
Style
A complete style for a highlight category.
Theme
A complete syntax highlighting theme.

Enums§

ThemeError
Error type for theme parsing.