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.
This commit is contained in:
parent
13386a4786
commit
8b2d97eb56
1 changed files with 2 additions and 1 deletions
|
@ -101,7 +101,8 @@ pub struct LanguageConfiguration {
|
||||||
pub file_types: Vec<FileType>, // filename extension or ends_with? <Gemfile, rb, etc>
|
pub file_types: Vec<FileType>, // filename extension or ends_with? <Gemfile, rb, etc>
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub shebangs: Vec<String>, // interpreter(s) associated with language
|
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 comment_token: Option<String>,
|
||||||
pub text_width: Option<usize>,
|
pub text_width: Option<usize>,
|
||||||
pub soft_wrap: Option<SoftWrap>,
|
pub soft_wrap: Option<SoftWrap>,
|
||||||
|
|
Loading…
Add table
Reference in a new issue