Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
pub use settings::ImageFileSizeUnit;
use settings::{RegisterSetting, Settings};
/// The settings for the image viewer.
#[derive(Clone, Debug, Default, RegisterSetting)]
pub struct ImageViewerSettings {
/// The unit to use for displaying image file sizes.
///
/// Default: "binary"
pub unit: ImageFileSizeUnit,
}
impl Settings for ImageViewerSettings {
fn from_settings(content: &settings::SettingsContent) -> Self {
Self {
unit: content.image_viewer.clone().unwrap().unit.unwrap(),
}
}
}