diff --git a/crates/editor2/src/hover_popover.rs b/crates/editor2/src/hover_popover.rs index 9eddd259af..bee95994e4 100644 --- a/crates/editor2/src/hover_popover.rs +++ b/crates/editor2/src/hover_popover.rs @@ -325,23 +325,22 @@ fn show_hover( }; this.update(&mut cx, |this, cx| { - todo!(); - // if let Some(symbol_range) = hover_popover - // .as_ref() - // .and_then(|hover_popover| hover_popover.symbol_range.as_text_range()) - // { - // // Highlight the selected symbol using a background highlight - // this.highlight_background::( - // vec![symbol_range], - // |theme| theme.editor.hover_popover.highlight, - // cx, - // ); - // } else { - // this.clear_background_highlights::(cx); - // } - // - // this.hover_state.info_popover = hover_popover; - // cx.notify(); + if let Some(symbol_range) = hover_popover + .as_ref() + .and_then(|hover_popover| hover_popover.symbol_range.as_text_range()) + { + // Highlight the selected symbol using a background highlight + this.highlight_background::( + vec![symbol_range], + |theme| theme.element_hover, // todo! update theme + cx, + ); + } else { + this.clear_background_highlights::(cx); + } + + this.hover_state.info_popover = hover_popover; + cx.notify(); })?; Ok::<_, anyhow::Error>(())