diff options
author | Michael Davis | 2023-11-13 14:24:24 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-11-14 02:56:53 +0000 |
commit | 8b2d97eb56d6cffcc6ce235d6a6bf2d56055fe4b (patch) | |
tree | 92dd87a6848bd60e725e2bf4ef449bea0f7c246c /helix-core/src/syntax.rs | |
parent | 13386a47865f7cf857dbd78dbfd107e0e2fa9bd8 (diff) |
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.
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 881b4509..36a1e5c9 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -101,7 +101,8 @@ pub struct LanguageConfiguration { pub file_types: Vec<FileType>, // filename extension or ends_with? <Gemfile, rb, etc> #[serde(default)] pub shebangs: Vec<String>, // interpreter(s) associated with language - pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml> + #[serde(default)] + pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml> pub comment_token: Option<String>, pub text_width: Option<usize>, pub soft_wrap: Option<SoftWrap>, |