Apply file-system operations coming from an LSP code action

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-02-07 16:11:40 +01:00
co-authored by Nathan Sobo
parent 982e90539d
commit a172c3c5c6
5 changed files with 346 additions and 49 deletions
+6 -1
View File
@@ -2077,8 +2077,13 @@ impl Editor {
Some((buffer, action))
})?;
Some(workspace.project().update(cx, |project, cx| {
let apply_code_actions = workspace.project().update(cx, |project, cx| {
project.apply_code_action(buffer, action, cx)
});
Some(cx.spawn(|workspace, cx| async move {
let buffers = apply_code_actions.await?;
Ok(())
}))
}