diff options
author | Omnikar | 2021-11-09 02:07:54 +0000 |
---|---|---|
committer | GitHub | 2021-11-09 02:07:54 +0000 |
commit | a424ef4e209c0483385acedffd2331534f0ce906 (patch) | |
tree | bf41c9fe7cf86df3fc6f10a91e0efa2e88e233fe /helix-core/src/syntax.rs | |
parent | eb68cd37671ced61d2a64d2042fde53190d0f296 (diff) |
Use default `languages.toml` if user's is invalid (#994)
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<LanguageConfiguration>, } // 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, |