diff options
Diffstat (limited to 'support/texlab/crates/base-db/src/config.rs')
-rw-r--r-- | support/texlab/crates/base-db/src/config.rs | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/support/texlab/crates/base-db/src/config.rs b/support/texlab/crates/base-db/src/config.rs index 9814e3e674..e4c827e61c 100644 --- a/support/texlab/crates/base-db/src/config.rs +++ b/support/texlab/crates/base-db/src/config.rs @@ -3,9 +3,8 @@ use std::time::Duration; use parser::SyntaxConfig; use regex::Regex; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct Config { - pub root_dir: Option<String>, pub build: BuildConfig, pub diagnostics: DiagnosticsConfig, pub formatting: FormattingConfig, @@ -36,7 +35,7 @@ pub struct DiagnosticsConfig { pub delay: Duration, } -#[derive(Debug)] +#[derive(Debug, Default)] pub struct ChktexConfig { pub on_open: bool, pub on_save: bool, @@ -65,13 +64,13 @@ pub enum Formatter { LatexIndent, } -#[derive(Debug)] +#[derive(Debug, Default)] pub struct LatexIndentConfig { pub local: Option<String>, pub modify_line_breaks: bool, } -#[derive(Debug)] +#[derive(Debug, Default)] pub struct SymbolConfig { pub allowed_patterns: Vec<Regex>, pub ignored_patterns: Vec<Regex>, @@ -96,22 +95,6 @@ pub enum MatchingAlgo { PrefixIgnoreCase, } -impl Default for Config { - fn default() -> Self { - Self { - root_dir: None, - build: BuildConfig::default(), - diagnostics: DiagnosticsConfig::default(), - formatting: FormattingConfig::default(), - synctex: None, - symbols: SymbolConfig::default(), - syntax: SyntaxConfig::default(), - completion: CompletionConfig::default(), - inlay_hints: InlayHintConfig::default(), - } - } -} - impl Default for BuildConfig { fn default() -> Self { Self { @@ -141,17 +124,6 @@ impl Default for DiagnosticsConfig { } } -impl Default for ChktexConfig { - fn default() -> Self { - Self { - on_open: false, - on_save: false, - on_edit: false, - additional_args: Vec::new(), - } - } -} - impl Default for FormattingConfig { fn default() -> Self { Self { @@ -163,24 +135,6 @@ impl Default for FormattingConfig { } } -impl Default for LatexIndentConfig { - fn default() -> Self { - Self { - local: None, - modify_line_breaks: false, - } - } -} - -impl Default for SymbolConfig { - fn default() -> Self { - Self { - allowed_patterns: Vec::new(), - ignored_patterns: Vec::new(), - } - } -} - impl Default for InlayHintConfig { fn default() -> Self { Self { |