Embed a plain text grammar and override settings for that too

This commit is contained in:
Antonio Scandurra 2021-11-29 18:01:51 +01:00
parent 2c17ae9aa6
commit 9d7039ed51
4 changed files with 25 additions and 1 deletions

View file

@ -27,6 +27,13 @@ fn main() {
let theme = themes.get(DEFAULT_THEME_NAME).unwrap();
let settings = Settings::new("Inconsolata", &app.font_cache(), theme)
.unwrap()
.with_overrides(
language::PLAIN_TEXT.name(),
settings::Override {
soft_wrap: Some(settings::SoftWrap::PreferredLineLength),
..Default::default()
},
)
.with_overrides(
"Markdown",
settings::Override {