Port changes to zed2
This commit is contained in:
parent
24dd1c5812
commit
09346fb9f1
8 changed files with 1059 additions and 501 deletions
|
@ -4157,7 +4157,9 @@ impl Project {
|
|||
match prettier_task.await
|
||||
{
|
||||
Ok(prettier) => {
|
||||
let buffer_path = buffer.update(&mut cx, |buffer, cx| File::from_dyn(buffer.file()).map(|f| f.abs_path(cx)));
|
||||
let buffer_path = buffer.update(&mut cx, |buffer, cx| {
|
||||
File::from_dyn(buffer.file()).map(|file| file.abs_path(cx))
|
||||
});
|
||||
format_operation = Some(FormatOperation::Prettier(
|
||||
prettier
|
||||
.format(buffer, buffer_path, &cx)
|
||||
|
@ -4213,7 +4215,9 @@ impl Project {
|
|||
match prettier_task.await
|
||||
{
|
||||
Ok(prettier) => {
|
||||
let buffer_path = buffer.update(&mut cx, |buffer, cx| File::from_dyn(buffer.file()).map(|f| f.abs_path(cx)));
|
||||
let buffer_path = buffer.update(&mut cx, |buffer, cx| {
|
||||
File::from_dyn(buffer.file()).map(|file| file.abs_path(cx))
|
||||
});
|
||||
format_operation = Some(FormatOperation::Prettier(
|
||||
prettier
|
||||
.format(buffer, buffer_path, &cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue