From ceafbfe7f088e07edf2b11669a14a9d24842e4f0 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 13 Nov 2023 09:24:24 -0500 Subject: [PATCH] Default 'roots' field of language config Previously roots needed to be specified by every language and `[]` was used as an explicit default. Root files don't make sense for every language (for example TOML) so I think we should allow languages to not explicitly mention the key and have the `[]` default automatically. --- helix-core/src/syntax.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 881b45098a9e4..a5a798dd0db3b 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -101,6 +101,7 @@ pub struct LanguageConfiguration { pub file_types: Vec, // filename extension or ends_with? #[serde(default)] pub shebangs: Vec, // interpreter(s) associated with language + #[serde(default)] pub roots: Vec, // these indicate project roots <.git, Cargo.toml> pub comment_token: Option, pub text_width: Option,