From f64d6d71c2216d045f74fc59897f83b3c8326ed1 Mon Sep 17 00:00:00 2001 From: Hendrik Wolff Date: Tue, 11 Jun 2024 00:39:06 +0200 Subject: [PATCH] Auto Save All Buffers After A Delay (#10899) * auto save after delay * configable * clearer names * init * working with some odd behaviour * working with greater consistency * Apply reviewer suggestions - Remove unneccessary field - Remove blocking save * Improve auto-save configuration Auto save can be configured to trigger on focus loss: ```toml auto-save.focus-lost = true|false ``` and after a time delay (in milli seconds) since last keypress: ```toml auto-save.after-delay.enable = true|false auto-save.after-delay.timeout = [0, u64::MAX] # default: 3000 ``` * Remove boilerplate and unnecessary types * Remove more useless types * Update docs for auto-save.after-delay * Fix wording of (doc) comments relating to auto-save * book: Move auto-save descriptions to separate section --------- Co-authored-by: Miguel Perez Co-authored-by: Miguel Perez --- helix-term/src/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/handlers.rs b/helix-term/src/handlers.rs index e16b988014cc4..7478b6b13cc6b 100644 --- a/helix-term/src/handlers.rs +++ b/helix-term/src/handlers.rs @@ -32,6 +32,6 @@ pub fn setup(config: Arc>) -> Handlers { completion::register_hooks(&handlers); signature_help::register_hooks(&handlers); - diagnostics::register_hooks(&handlers); + auto_save::register_hooks(&handlers); handlers }