zeta: Improve UX for simultaneous LSP and prediction completions (#24024)
Release Notes: - N/A --------- Co-authored-by: Michael Sloan <michael@zed.dev> Co-authored-by: Danilo <danilo@zed.dev> Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
parent
b6e680ea3d
commit
4c29e1ff07
16 changed files with 1196 additions and 762 deletions
|
@ -26,7 +26,7 @@ use fs::MTime;
|
|||
use futures::channel::oneshot;
|
||||
use gpui::{
|
||||
AnyElement, App, AppContext as _, Context, Entity, EventEmitter, HighlightStyle, Pixels,
|
||||
SharedString, Task, TaskLabel, Window,
|
||||
SharedString, StyledText, Task, TaskLabel, TextStyle, Window,
|
||||
};
|
||||
use lsp::LanguageServerId;
|
||||
use parking_lot::Mutex;
|
||||
|
@ -617,6 +617,11 @@ impl HighlightedText {
|
|||
);
|
||||
highlighted_text.build()
|
||||
}
|
||||
|
||||
pub fn to_styled_text(&self, default_style: &TextStyle) -> StyledText {
|
||||
gpui::StyledText::new(self.text.clone())
|
||||
.with_highlights(default_style, self.highlights.iter().cloned())
|
||||
}
|
||||
}
|
||||
|
||||
impl HighlightedTextBuilder {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue