diff --git a/crates/editor/src/mouse_context_menu.rs b/crates/editor/src/mouse_context_menu.rs index 1313ad346f..be083b2bce 100644 --- a/crates/editor/src/mouse_context_menu.rs +++ b/crates/editor/src/mouse_context_menu.rs @@ -1,11 +1,9 @@ -use context_menu::{ContextMenu, ContextMenuItem}; -use gpui::{ - geometry::vector::Vector2F, impl_internal_actions, MutableAppContext, Task, ViewContext, - ViewHandle, -}; +use context_menu::ContextMenuItem; +use gpui::{geometry::vector::Vector2F, impl_internal_actions, MutableAppContext, ViewContext}; use crate::{ DisplayPoint, Editor, EditorMode, FindAllReferences, GoToDefinition, Rename, SelectMode, + ToggleCodeActions, }; #[derive(Clone, PartialEq)] @@ -20,11 +18,6 @@ pub fn init(cx: &mut MutableAppContext) { cx.add_action(deploy_context_menu); } -pub struct MouseContextMenuState { - pub context_menu: ViewHandle, - pub task: Option>, -} - pub fn deploy_context_menu( editor: &mut Editor, &DeployMouseContextMenu { position, point }: &DeployMouseContextMenu, @@ -53,6 +46,12 @@ pub fn deploy_context_menu( ContextMenuItem::item("Rename Symbol", Rename), ContextMenuItem::item("Go To Definition", GoToDefinition), ContextMenuItem::item("Find All References", FindAllReferences), + ContextMenuItem::item( + "Code Actions", + ToggleCodeActions { + deployed_from_indicator: false, + }, + ), ], cx, );