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.

Restore hover action in the editor

Kirill Bulatov9bb50a5ded75
diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs
index 26ce3e5cf70..8da2f50c198 100644
--- a/crates/editor/src/hover_popover.rs
+++ b/crates/editor/src/hover_popover.rs
@@ -2,13 +2,13 @@ use crate::{
display_map::{InlayOffset, ToDisplayPoint},
link_go_to_definition::{InlayHighlight, RangeInEditor},
Anchor, AnchorRangeExt, DisplayPoint, Editor, EditorSettings, EditorSnapshot, EditorStyle,
- ExcerptId, RangeToAnchorExt,
+ ExcerptId, Hover, RangeToAnchorExt,
};
use futures::FutureExt;
use gpui::{
- actions, div, px, AnyElement, CursorStyle, Hsla, InteractiveElement, IntoElement, Model,
- MouseButton, ParentElement, Pixels, SharedString, Size, StatefulInteractiveElement, Styled,
- Task, ViewContext, WeakView,
+ div, px, AnyElement, CursorStyle, Hsla, InteractiveElement, IntoElement, Model, MouseButton,
+ ParentElement, Pixels, SharedString, Size, StatefulInteractiveElement, Styled, Task,
+ ViewContext, WeakView,
};
use language::{markdown, Bias, DiagnosticEntry, Language, LanguageRegistry, ParsedMarkdown};
@@ -27,8 +27,6 @@ pub const MIN_POPOVER_CHARACTER_WIDTH: f32 = 20.;
pub const MIN_POPOVER_LINE_HEIGHT: Pixels = px(4.);
pub const HOVER_POPOVER_GAP: Pixels = px(10.);
-actions!(editor, [Hover]);
-
/// Bindable action which uses the most recent selection head to trigger a hover
pub fn hover(editor: &mut Editor, _: &Hover, cx: &mut ViewContext<Editor>) {
let head = editor.selections.newest_display(cx).head();