1use std::{
2 ops::Range,
3 time::{Duration, Instant},
4};
5
6use gpui::{
7 actions,
8 elements::{Flex, MouseEventHandler, Padding, Text},
9 impl_internal_actions,
10 platform::CursorStyle,
11 Axis, Element, ElementBox, ModelHandle, MutableAppContext, RenderContext, Task, ViewContext,
12};
13use language::Bias;
14use project::{HoverBlock, Project};
15use util::TryFutureExt;
16
17use crate::{
18 display_map::ToDisplayPoint, Anchor, AnchorRangeExt, DisplayPoint, Editor, EditorSnapshot,
19 EditorStyle,
20};
21
22#[derive(Clone, PartialEq)]
23pub struct FetchDefinition {
24 pub point: Option<DisplayPoint>,
25}
26
27#[derive(Clone, PartialEq)]
28pub struct GoToFetchedDefinition {
29 pub point: Option<DisplayPoint>,
30}
31
32impl_internal_actions!(edtior, [FetchDefinition, GoToFetchedDefinition]);
33
34pub fn init(cx: &mut MutableAppContext) {
35 cx.add_action(fetch_definition);
36 cx.add_action(go_to_fetched_definition);
37}
38
39pub fn fetch_definition(
40 editor: &mut Editor,
41 FetchDefinition { point }: &FetchDefinition,
42 cx: &mut ViewContext<Editor>,
43) {
44}
45
46pub fn go_to_fetched_definition(
47 editor: &mut Editor,
48 GoToFetchedDefinition { point }: &GoToFetchedDefinition,
49 cx: &mut ViewContext<Editor>,
50) {
51}
52
53#[derive(Default)]
54pub struct LinkGoToDefinitionState {
55 pub triggered_from
56 pub symbol_range: Option<Range<Anchor>>,
57 pub task: Option<Task<Option<()>>>,
58}