Skip to content

Commit b6e393c

Browse files
committed
fix: don't err if auto_render_languages isn't set
1 parent 5507ea4 commit b6e393c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config-file-schema.json

-3
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,6 @@
282282
},
283283
"OptionsConfig": {
284284
"type": "object",
285-
"required": [
286-
"auto_render_languages"
287-
],
288285
"properties": {
289286
"auto_render_languages": {
290287
"description": "Assume snippets for these languages contain `+render` and render them automatically.",

src/config.rs

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ pub struct OptionsConfig {
136136
pub strict_front_matter_parsing: Option<bool>,
137137

138138
/// Assume snippets for these languages contain `+render` and render them automatically.
139+
#[serde(default)]
139140
pub auto_render_languages: Vec<SnippetLanguage>,
140141
}
141142

@@ -510,4 +511,9 @@ mod test {
510511
let config = KeyBindingsConfig::default();
511512
CommandKeyBindings::try_from(config).expect("construction failed");
512513
}
514+
515+
#[test]
516+
fn default_options_serde() {
517+
serde_yaml::from_str::<'_, OptionsConfig>("implicit_slide_ends: true").expect("failed to parse");
518+
}
513519
}

0 commit comments

Comments
 (0)