aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 8803792a..95faa01b 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -999,16 +999,19 @@ impl Application {
Ok(serde_json::Value::Null)
}
Ok(MethodCall::ApplyWorkspaceEdit(params)) => {
- apply_workspace_edit(
+ let res = apply_workspace_edit(
&mut self.editor,
helix_lsp::OffsetEncoding::Utf8,
&params.edit,
);
Ok(json!(lsp::ApplyWorkspaceEditResponse {
- applied: true,
- failure_reason: None,
- failed_change: None,
+ applied: res.is_ok(),
+ failure_reason: res.as_ref().err().map(|err| err.kind.to_string()),
+ failed_change: res
+ .as_ref()
+ .err()
+ .map(|err| err.failed_change_idx as u32),
}))
}
Ok(MethodCall::WorkspaceFolders) => {