Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 2e5c60cf..27dc4523 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -345,6 +345,10 @@ pub struct Config {
pub default_line_ending: LineEndingConfig,
/// Whether to automatically insert a trailing line-ending on write if missing. Defaults to `true`.
pub insert_final_newline: bool,
+ /// Whether to use atomic operations to write documents to disk.
+ /// This prevents data loss if the editor is interrupted while writing the file, but may
+ /// confuse some file watching/hot reloading programs. Defaults to `true`.
+ pub atomic_save: bool,
/// Whether to automatically remove all trailing line-endings after the final one on write.
/// Defaults to `false`.
pub trim_final_newlines: bool,
@@ -1020,6 +1024,7 @@ impl Default for Config {
workspace_lsp_roots: Vec::new(),
default_line_ending: LineEndingConfig::default(),
insert_final_newline: true,
+ atomic_save: true,
trim_final_newlines: false,
trim_trailing_whitespace: false,
smart_tab: Some(SmartTabConfig::default()),