diff options
Diffstat (limited to 'helix-view/src/theme.rs')
-rw-r--r-- | helix-view/src/theme.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 947c6ee0..ece4fe9a 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -215,6 +215,10 @@ impl Theme { pub fn scopes(&self) -> &[String] { &self.scopes } + + pub fn find_scope_index(&self, scope: &str) -> Option<usize> { + self.scopes().iter().position(|s| s == scope) + } } #[test] |