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:
parent
41de83fe1f
commit
5e449c84fe
12 changed files with 802 additions and 479 deletions
|
@ -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()),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue