Files
oak-gpui/crates/zed_actions/src/lib.rs
T
Marshall BowersandMax a7ffc2b6f3 Show current plan in user menu (#15513)
This PR updates the user menu to show the user's current plan.

Also adds a new RPC message to send this information down to the client
when Zed starts.

This is behind a feature flag.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-07-30 17:38:16 -04:00

43 lines
1003 B
Rust

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,
OpenAccountSettings,
Quit,
OpenKeymap,
About,
OpenLicenses,
OpenTelemetryLog,
DecreaseBufferFontSize,
IncreaseBufferFontSize,
ResetBufferFontSize,
DecreaseUiFontSize,
IncreaseUiFontSize,
ResetUiFontSize
]
);