From 846a6b65c3d13f49b571beee2189d17b71c92e3f Mon Sep 17 00:00:00 2001 From: Seth Bromberger Date: Wed, 27 Jul 2022 01:47:22 +0200 Subject: add configurable / theme-able statusline separator string (#3175) * add configurable separator element to statusline * themable separator * clippy fixes * changed default separator to │ * doc updates--- helix-view/src/editor.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'helix-view/src/editor.rs') diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f99924cf..501c3069 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -203,6 +203,7 @@ pub struct StatusLineConfig { pub left: Vec, pub center: Vec, pub right: Vec, + pub separator: String, } impl Default for StatusLineConfig { @@ -213,6 +214,7 @@ impl Default for StatusLineConfig { left: vec![E::Mode, E::Spinner, E::FileName], center: vec![], right: vec![E::Diagnostics, E::Selections, E::Position, E::FileEncoding], + separator: String::from("│"), } } } @@ -247,8 +249,12 @@ pub enum StatusLineElement { /// The cursor position Position, + /// The separator string + Separator, + /// The cursor position as a percent of the total file PositionPercentage, + /// A single space Spacer, } -- cgit v1.2.3-70-g09d2