tree-painter 0.0.0

a source code syntax highlighting library based on tree-sitter and Helix editor themes and rendering to HTML and CSS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Errors occuring during parsing of themes and rendering.
#[derive(thiserror::Error, Debug)]
pub enum Error {
    /// Helix theme could not be parsed as valid TOML
    #[error("toml parse eror: {0}")]
    Toml(#[from] toml::de::Error),
    /// TOML data is not structured like a valid Helix theme.
    #[error("toml does not contain valid helix theme")]
    InvalidTheme,
    /// A color is referenced but is not defined.
    #[error("toml color {0} not found")]
    InvalidColorReference(String),
    /// Failed to highlight source.
    #[error("highlighting failed: {0}")]
    Highlighting(#[from] tree_sitter_highlight::Error),
}