Add two_face themes in cosmic-edit instead of cosmic-text

This commit is contained in:
Jeremy Soller 2023-11-06 09:30:07 -07:00
parent 07145d6786
commit e76b63a039
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 153 additions and 80 deletions

View file

@ -42,7 +42,14 @@ mod text_box;
lazy_static::lazy_static! {
static ref FONT_SYSTEM: Mutex<FontSystem> = Mutex::new(FontSystem::new());
static ref SWASH_CACHE: Mutex<SwashCache> = Mutex::new(SwashCache::new());
static ref SYNTAX_SYSTEM: SyntaxSystem = SyntaxSystem::new();
static ref SYNTAX_SYSTEM: SyntaxSystem = {
let lazy_theme_set = two_face::theme::LazyThemeSet::from(two_face::theme::extra());
SyntaxSystem {
//TODO: store newlines in buffer
syntax_set: two_face::syntax::extra_no_newlines(),
theme_set: syntect::highlighting::ThemeSet::from(&lazy_theme_set),
}
};
}
fn main() -> Result<(), Box<dyn std::error::Error>> {