editor: inlay hints properly use theme style.syntax.hints

This commit is contained in:
Lauren Hinchcliffe 2025-08-14 18:31:13 -07:00
parent 74e17c2f64
commit a1d002a702
No known key found for this signature in database

View file

@ -581,11 +581,22 @@ pub fn make_inlay_hints_style(cx: &mut App) -> HighlightStyle {
.inlay_hints
.show_background;
HighlightStyle {
color: Some(cx.theme().status().hint),
background_color: show_background.then(|| cx.theme().status().hint_background),
..HighlightStyle::default()
let mut style = cx.theme().syntax().get("hint");
if style.color.is_none() {
style.color = Some(cx.theme().status().hint);
}
if !show_background {
style.background_color = None;
return style;
}
if style.background_color.is_none() {
style.background_color = Some(cx.theme().status().hint_background);
}
style
}
pub fn make_suggestion_styles(cx: &mut App) -> EditPredictionStyles {