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:
parent
0ba40bdfb8
commit
d49cd0019f
7 changed files with 146 additions and 85 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue