ratatui_toolkit/widgets/markdown_widget/extensions/theme/syntax_highlighter/
mod.rs

1//! Syntax highlighting for code blocks using syntect.
2//!
3//! This module provides syntax highlighting functionality for code blocks
4//! in markdown documents using the syntect library.
5
6pub mod constructors;
7pub mod methods;
8mod traits;
9
10use crate::widgets::markdown_widget::extensions::theme::SyntaxThemeVariant;
11
12/// Highlighter for code blocks using syntect.
13pub struct SyntaxHighlighter {
14    #[cfg(feature = "markdown")]
15    pub(crate) syntax_set: syntect::parsing::SyntaxSet,
16    #[cfg(feature = "markdown")]
17    pub(crate) theme: syntect::highlighting::Theme,
18    #[cfg(feature = "markdown")]
19    pub(crate) theme_variant: SyntaxThemeVariant,
20}