Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

For informational LSP queries log errors instead of notifying in UI (#23040)

Michael Sloan4c5020103668
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 26d7d362924..0a468deb901 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -314,38 +314,32 @@ impl EditorElement {
register_action(view, cx, Editor::go_to_next_hunk);
register_action(view, cx, Editor::go_to_prev_hunk);
register_action(view, cx, |editor, a, cx| {
- editor.go_to_definition(a, cx).detach_and_notify_err(cx);
+ editor.go_to_definition(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
- editor
- .go_to_definition_split(a, cx)
- .detach_and_notify_err(cx);
+ editor.go_to_definition_split(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
- editor.go_to_declaration(a, cx).detach_and_notify_err(cx);
+ editor.go_to_declaration(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
- editor
- .go_to_declaration_split(a, cx)
- .detach_and_notify_err(cx);
+ editor.go_to_declaration_split(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
- editor.go_to_implementation(a, cx).detach_and_notify_err(cx);
+ editor.go_to_implementation(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
editor
.go_to_implementation_split(a, cx)
- .detach_and_notify_err(cx);
+ .detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
- editor
- .go_to_type_definition(a, cx)
- .detach_and_notify_err(cx);
+ editor.go_to_type_definition(a, cx).detach_and_log_err(cx);
});
register_action(view, cx, |editor, a, cx| {
editor
.go_to_type_definition_split(a, cx)
- .detach_and_notify_err(cx);
+ .detach_and_log_err(cx);
});
register_action(view, cx, Editor::open_url);
register_action(view, cx, Editor::open_selected_filename);
@@ -440,7 +434,7 @@ impl EditorElement {
});
register_action(view, cx, |editor, action, cx| {
if let Some(task) = editor.find_all_references(action, cx) {
- task.detach_and_notify_err(cx);
+ task.detach_and_log_err(cx);
} else {
cx.propagate();
}