From cc6208b17fe810707332e41f53bb77b759965080 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 4 Nov 2025 13:10:51 +0200 Subject: [PATCH] Show inlay label parts' tooltips if those are present and hovered (#41889) Part of https://github.com/zed-industries/zed/issues/33715 https://github.com/user-attachments/assets/d2d6f47d-3974-4c8c-aab9-9046891186bf Unlike VSCode that does more advanced hovering, this one only works for inlays with tooltip LSP data in them. Release Notes: - Started to show inlay label parts' tooltips when they are hovered Co-authored-by: Lukas Wirth --- crates/editor/src/element.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 761d71d43b24ddf54f8410f64c7357fd2fb6dca4..7fa5daed9c5f5bbc97d39b2e529c39adffdc6eed 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1310,7 +1310,14 @@ impl EditorElement { hover_at(editor, Some(anchor), window, cx); Self::update_visible_cursor(editor, point, position_map, window, cx); } else { - hover_at(editor, None, window, cx); + editor.update_inlay_link_and_hover_points( + &position_map.snapshot, + point_for_position, + modifiers.secondary(), + modifiers.shift, + window, + cx, + ); } } else { editor.hide_hovered_link(cx);