diff --git a/Cargo.toml b/Cargo.toml index a662f71f4e..1c97519c78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ std = [ "sys-locale", "unicode-bidi/std", ] +two-face = ["dep:two-face", "syntect"] vi = ["syntect"] wasm-web = ["sys-locale?/js"] warn_on_missing_glyphs = [] diff --git a/src/edit/syntect.rs b/src/edit/syntect.rs index 9ba06dd8c3..5a3c54028c 100644 --- a/src/edit/syntect.rs +++ b/src/edit/syntect.rs @@ -34,11 +34,11 @@ impl SyntaxSystem { /// Create a new [`SyntaxSystem`] using `[two-face]` definitions #[cfg(feature = "two-face")] pub fn new() -> Self { + let lazy_theme_set = two_face::theme::LazyThemeSet::from(two_face::theme::extra()); Self { //TODO: store newlines in buffer syntax_set: two_face::syntax::extra_no_newlines(), - //TODO: use two-face themes - theme_set: ThemeSet::load_defaults(), + theme_set: ThemeSet::from(&lazy_theme_set), } } }