Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r--helix-view/src/view.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index 6d237e20..aecf09a6 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -11,7 +11,6 @@ use crate::{
use helix_core::{
char_idx_at_visual_offset,
doc_formatter::TextFormat,
- syntax::Highlight,
text_annotations::TextAnnotations,
visual_offset_from_anchor, visual_offset_from_block, Position, RopeSlice, Selection,
Transaction,
@@ -446,9 +445,7 @@ impl View {
let mut text_annotations = TextAnnotations::default();
if let Some(labels) = doc.jump_labels.get(&self.id) {
- let style = theme
- .and_then(|t| t.find_scope_index("ui.virtual.jump-label"))
- .map(Highlight);
+ let style = theme.and_then(|t| t.find_highlight("ui.virtual.jump-label"));
text_annotations.add_overlay(labels, style);
}
@@ -461,15 +458,10 @@ impl View {
padding_after_inlay_hints,
}) = doc.inlay_hints.get(&self.id)
{
- let type_style = theme
- .and_then(|t| t.find_scope_index("ui.virtual.inlay-hint.type"))
- .map(Highlight);
- let parameter_style = theme
- .and_then(|t| t.find_scope_index("ui.virtual.inlay-hint.parameter"))
- .map(Highlight);
- let other_style = theme
- .and_then(|t| t.find_scope_index("ui.virtual.inlay-hint"))
- .map(Highlight);
+ let type_style = theme.and_then(|t| t.find_highlight("ui.virtual.inlay-hint.type"));
+ let parameter_style =
+ theme.and_then(|t| t.find_highlight("ui.virtual.inlay-hint.parameter"));
+ let other_style = theme.and_then(|t| t.find_highlight("ui.virtual.inlay-hint"));
// Overlapping annotations are ignored apart from the first so the order here is not random:
// types -> parameters -> others should hopefully be the "correct" order for most use cases,