trishume / syntect

Rust library for syntax highlighting using Sublime Text syntax definitions.
https://docs.rs/syntect
MIT License
1.91k stars 135 forks source link

Question: Change background color with easy module #463

Open ogarcia opened 1 year ago

ogarcia commented 1 year ago

Maybe this is a stupid question, but I have searched the documentation and issues and have not found any information.

Is there any way to change the background color when using the easy module without creating a new theme?

If this is not possible, perhaps it would be interesting to include a variant of the base16-ocean.dark theme where the background color is completely black (It could be called base16-ocean.black), since many of the terminals use that kind of background color.

CosmicHorrorDev commented 1 year ago

You can change the background of whatever theme you go with

let mut theme_set = ThemeSet::load_defaults();
theme_set
    .get_mut("base16-ocean.dark")
    .unwrap()
    .settings
    .background = Some(Color::BLACK);
ogarcia commented 1 year ago

@CosmicHorrorDev thanks, is a very good workaround. But I still think that syntect should have a true black theme by itself.