aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/editor.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 5a81cb5d..f2e85307 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -42,7 +42,7 @@ use anyhow::{anyhow, bail, Error};
pub use helix_core::diagnostic::Severity;
use helix_core::{
auto_pairs::AutoPairs,
- syntax::{self, AutoPairConfig, SoftWrap},
+ syntax::{self, AutoPairConfig, IndentationHeuristic, SoftWrap},
Change, LineEnding, NATIVE_LINE_ENDING,
};
use helix_core::{Position, Selection};
@@ -291,6 +291,9 @@ pub struct Config {
pub insert_final_newline: bool,
/// Enables smart tab
pub smart_tab: Option<SmartTabConfig>,
+ /// Which indent heuristic to use when a new line is inserted
+ #[serde(default)]
+ pub indent_heuristic: IndentationHeuristic,
}
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)]
@@ -841,6 +844,7 @@ impl Default for Config {
default_line_ending: LineEndingConfig::default(),
insert_final_newline: true,
smart_tab: Some(SmartTabConfig::default()),
+ indent_heuristic: IndentationHeuristic::default(),
}
}
}