diff options
author | Em Zhan | 2023-09-12 00:06:25 +0000 |
---|---|---|
committer | GitHub | 2023-09-12 00:06:25 +0000 |
commit | 7090555daba6bce37dc6cc900387015a10a1e791 (patch) | |
tree | 3b7a16a0621526ccddac5d0cdb39c64ae87c62d9 /helix-view | |
parent | ef23847957463b95a68599efb12a32837d73727b (diff) |
Add `insert-final-newline` config option (#8157)
Co-authored-by: Xalfer <64538944+Xalfer@users.noreply.github.com>
Diffstat (limited to 'helix-view')
-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 6963867a..2265633d 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -287,6 +287,8 @@ pub struct Config { pub workspace_lsp_roots: Vec<PathBuf>, /// Which line ending to choose for new documents. Defaults to `native`. i.e. `crlf` on Windows, otherwise `lf`. 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, /// Enables smart tab pub smart_tab: Option<SmartTabConfig>, } @@ -842,6 +844,7 @@ impl Default for Config { completion_replace: false, workspace_lsp_roots: Vec::new(), default_line_ending: LineEndingConfig::default(), + insert_final_newline: true, smart_tab: Some(SmartTabConfig::default()), } } |