aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/theme.rs
diff options
context:
space:
mode:
authorJJ2023-11-01 01:14:55 +0000
committerJJ2023-11-01 04:08:40 +0000
commit368995b51f2b0b8574a87ebe04749cb556b4c538 (patch)
treeeadf3985f5d1f703542a1df7759b0d84b79e6a46 /helix-view/src/theme.rs
parenteaf8d6d30da5014a3c475c4187b9dccfe621afd5 (diff)
Add rainbow indentation guides
ref: https://github.com/helix-editor/helix/issues/4010 ref: https://github.com/helix-editor/helix/pull/4493 Co-authored-by: SoraTenshi <dream@neoncity.dev>
Diffstat (limited to 'helix-view/src/theme.rs')
-rw-r--r--helix-view/src/theme.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs
index 16da247f..8236d370 100644
--- a/helix-view/src/theme.rs
+++ b/helix-view/src/theme.rs
@@ -383,6 +383,10 @@ impl Theme {
pub fn rainbow_length(&self) -> usize {
self.rainbow_length
}
+
+ pub fn get_rainbow(&self, index: usize) -> Style {
+ self.highlights[index % self.rainbow_length]
+ }
}
fn default_rainbow() -> Vec<Style> {