diff options
author | unrelentingtech | 2022-05-02 14:31:07 +0000 |
---|---|---|
committer | GitHub | 2022-05-02 14:31:07 +0000 |
commit | 20162a426b991f1a07f347f8180480871d15a27a (patch) | |
tree | 9ce6a587f2dc1eeb4662007864910acc1f30c574 /helix-view/src | |
parent | f9baced216df60122f2aae08d382931d77901ca9 (diff) |
feat(commands): make it possible to disable format-on-save via the 'auto-format' option (#2321)
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 0de1732c..29aea74b 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -127,6 +127,8 @@ pub struct Config { pub auto_pairs: AutoPairConfig, /// Automatic auto-completion, automatically pop up without user trigger. Defaults to true. pub auto_completion: bool, + /// Automatic formatting on save. Defaults to true. + pub auto_format: bool, /// Time in milliseconds since last keypress before idle timers trigger. /// Used for autocompletion, set to 0 for instant. Defaults to 400ms. #[serde( @@ -374,6 +376,7 @@ impl Default for Config { middle_click_paste: true, auto_pairs: AutoPairConfig::default(), auto_completion: true, + auto_format: true, idle_timeout: Duration::from_millis(400), completion_trigger_len: 2, auto_info: true, |