Log prettier errors on failures (#19951)

Closes https://github.com/zed-industries/zed/issues/11987

Release Notes:

- Fixed prettier not reporting failures in the status panel on
formatting and installation errors
This commit is contained in:
Kirill Bulatov 2024-10-30 14:49:47 +02:00 committed by GitHub
parent 0ba40bdfb8
commit d49cd0019f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 146 additions and 85 deletions

View file

@ -329,11 +329,7 @@ impl Prettier {
})?
.context("prettier params calculation")?;
let response = local
.server
.request::<Format>(params)
.await
.context("prettier format request")?;
let response = local.server.request::<Format>(params).await?;
let diff_task = buffer.update(cx, |buffer, cx| buffer.diff(response.text, cx))?;
Ok(diff_task.await)
}