Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
206b0f0f8c
commit
5242a3a6dc
33 changed files with 432 additions and 306 deletions
|
@ -1,14 +1,13 @@
|
|||
use editor::{display_map::ToDisplayPoint, Autoscroll, DisplayPoint, Editor};
|
||||
use gpui::{
|
||||
action, elements::*, geometry::vector::Vector2F, keymap::Binding, Axis, Entity,
|
||||
actions, elements::*, geometry::vector::Vector2F, keymap::Binding, Axis, Entity,
|
||||
MutableAppContext, RenderContext, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
use text::{Bias, Point};
|
||||
use workspace::Workspace;
|
||||
|
||||
action!(Toggle);
|
||||
action!(Confirm);
|
||||
actions!(go_to_line, [Toggle, Confirm]);
|
||||
|
||||
pub fn init(cx: &mut MutableAppContext) {
|
||||
cx.add_bindings([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue