Remove 2 suffix for ai, zed_actions, install_ci, feature_flags
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
ecbd115542
commit
4ddb26204f
60 changed files with 282 additions and 2867 deletions
11
crates/zed_actions/Cargo.toml
Normal file
11
crates/zed_actions/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "zed_actions"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
gpui = { package = "gpui2", path = "../gpui2" }
|
||||
serde.workspace = true
|
25
crates/zed_actions/src/lib.rs
Normal file
25
crates/zed_actions/src/lib.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
use gpui::{actions, impl_actions};
|
||||
use serde::Deserialize;
|
||||
|
||||
// If the zed binary doesn't use anything in this crate, it will be optimized away
|
||||
// and the actions won't initialize. So we just provide an empty initialization function
|
||||
// to be called from main.
|
||||
//
|
||||
// These may provide relevant context:
|
||||
// https://github.com/rust-lang/rust/issues/47384
|
||||
// https://github.com/mmastrac/rust-ctor/issues/280
|
||||
pub fn init() {}
|
||||
|
||||
#[derive(Clone, PartialEq, Deserialize)]
|
||||
pub struct OpenBrowser {
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Deserialize)]
|
||||
pub struct OpenZedURL {
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
impl_actions!(zed, [OpenBrowser, OpenZedURL]);
|
||||
|
||||
actions!(zed, [OpenSettings, Quit]);
|
Loading…
Add table
Add a link
Reference in a new issue