pub async fn apply_and_highlight(
handle: Arc<dyn Document>,
text: String,
spans: Vec<Vec<StyledSpan>>,
pending_highlights: Option<PendingSyntheticHighlightsHandle>,
buffer_id: BufferId,
)Expand description
Apply a full buffer replacement, then store highlights and fire the
waker so the Editor repaints immediately. Async — call from a tokio
task (NOT spawn_blocking). The blocking I/O phase
(build_and_format) must complete before calling this.