Pass inlay highlight information

This commit is contained in:
Kirill Bulatov 2023-08-21 23:21:37 +03:00
parent 477fc865f5
commit 6c5761d05b
9 changed files with 279 additions and 145 deletions

View file

@ -13,7 +13,7 @@ use crate::{
},
link_go_to_definition::{
go_to_fetched_definition, go_to_fetched_type_definition, update_go_to_definition_link,
GoToDefinitionTrigger,
GoToDefinitionTrigger, InlayCoordinates,
},
mouse_context_menu, EditorSettings, EditorStyle, GutterHover, UnfoldAt,
};
@ -1927,7 +1927,12 @@ fn update_inlay_link_and_hover_points(
update_go_to_definition_link(
editor,
GoToDefinitionTrigger::InlayHint(
hovered_hint.position,
InlayCoordinates {
inlay_id: hovered_hint.id,
inlay_position: hovered_hint.position,
inlay_start: hint_start_offset,
highlight_end: hovered_offset,
},
LocationLink {
origin: Some(Location {
buffer,