aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/view.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-11-21 00:46:12 +0000
committerBlaž Hrastnik2024-03-23 06:35:25 +0000
commitb46064b8c469c85b9626dba60728e23798354ed8 (patch)
tree203d9698a3e99767202c05e8c62850ea199a2a06 /helix-view/src/view.rs
parent3001f22b315e479dcfc24c7a0fd221d7fb03d276 (diff)
Add an Amp-like jump command
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r--helix-view/src/view.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index bbdc74a7..b5dc0615 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -415,6 +415,13 @@ impl View {
) -> TextAnnotations<'a> {
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);
+ text_annotations.add_overlay(labels, style);
+ }
+
let DocumentInlayHints {
id: _,
type_inlay_hints,