From a424ef4e209c0483385acedffd2331534f0ce906 Mon Sep 17 00:00:00 2001 From: Omnikar Date: Mon, 8 Nov 2021 21:07:54 -0500 Subject: Use default `languages.toml` if user's is invalid (#994) --- helix-core/src/syntax.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-core/src') diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index a5dd0c59..142265a8 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -40,13 +40,14 @@ where } #[derive(Debug, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] pub struct Configuration { pub language: Vec, } // largely based on tree-sitter/cli/src/loader.rs #[derive(Debug, Serialize, Deserialize)] -#[serde(rename_all = "kebab-case")] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct LanguageConfiguration { #[serde(rename = "name")] pub language_id: String, -- cgit v1.2.3-70-g09d2