diff options
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 79570faa..4188d148 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -79,6 +79,9 @@ pub struct LanguageConfiguration { #[serde(default)] pub auto_format: bool, + #[serde(skip_serializing_if = "Option::is_none")] + pub formatter: Option<FormatterConfiguration>, + #[serde(default)] pub diagnostic_severity: Severity, @@ -126,6 +129,15 @@ pub struct LanguageServerConfiguration { pub language_id: Option<String>, } +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub struct FormatterConfiguration { + pub command: String, + #[serde(default)] + #[serde(skip_serializing_if = "Vec::is_empty")] + pub args: Vec<String>, +} + #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] pub struct AdvancedCompletion { |