Skip to content

Commit

Permalink
Default 'roots' field of language config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
the-mikedavis committed Nov 13, 2023
1 parent 23fea46 commit 921efd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit 921efd6

Please sign in to comment.