edit prediction: Add syntax highlighting for diff popover (#23899)

Co-Authored-by: Antonio <antonio@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Bennet Bo Fenner 2025-01-30 11:53:51 +01:00 committed by GitHub
parent 41de83fe1f
commit 5e449c84fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 802 additions and 479 deletions

View file

@ -728,13 +728,13 @@ impl CompletionsMenu {
}
CompletionEntry::InlineCompletionHint(InlineCompletionMenuHint::Loaded { text }) => {
match text {
InlineCompletionText::Edit { text, highlights } => div()
InlineCompletionText::Edit(highlighted_edits) => div()
.mx_1()
.rounded_md()
.bg(cx.theme().colors().editor_background)
.child(
gpui::StyledText::new(text.clone())
.with_highlights(&style.text, highlights.clone()),
gpui::StyledText::new(highlighted_edits.text.clone())
.with_highlights(&style.text, highlighted_edits.highlights.clone()),
),
InlineCompletionText::Move(text) => div().child(text.clone()),
}