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 ceafbfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ 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
#[serde(default)]
pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
pub comment_token: Option<String>,
pub text_width: Option<usize>,
Expand Down

0 comments on commit ceafbfe

Please sign in to comment.