aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorGokul Soumya2022-05-31 17:13:08 +0000
committerBlaž Hrastnik2022-06-21 16:43:25 +0000
commit8ad0b83e306ff6dfc1499d3e6d25b2fd36a096a4 (patch)
tree501b37975764e8d3e14a7a5140e8ec81e5a7bd53 /helix-view/src
parent924b4ebb39df71d8499e7d38015c2423a89a3e49 (diff)
Make indent guides configurable
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/editor.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index ac19def1..b9de57e1 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -156,6 +156,8 @@ pub struct Config {
pub rulers: Vec<u16>,
#[serde(default)]
pub whitespace: WhitespaceConfig,
+ /// Vertical indent width guides.
+ pub indent_guides: IndentGuidesConfig,
}
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
@@ -364,6 +366,22 @@ impl Default for WhitespaceCharacters {
}
}
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(default)]
+pub struct IndentGuidesConfig {
+ pub render: bool,
+ pub character: char,
+}
+
+impl Default for IndentGuidesConfig {
+ fn default() -> Self {
+ Self {
+ render: false,
+ character: '│',
+ }
+ }
+}
+
impl Default for Config {
fn default() -> Self {
Self {
@@ -391,6 +409,7 @@ impl Default for Config {
lsp: LspConfig::default(),
rulers: Vec::new(),
whitespace: WhitespaceConfig::default(),
+ indent_guides: IndentGuidesConfig::default(),
}
}
}