diff --git a/yazi-config/preset/yazi.toml b/yazi-config/preset/yazi.toml index 496f2177..01cef0d3 100644 --- a/yazi-config/preset/yazi.toml +++ b/yazi-config/preset/yazi.toml @@ -18,6 +18,7 @@ title_format = "Yazi: {cwd}" [preview] tab_size = 2 +word_wrap = false max_width = 600 max_height = 900 cache_dir = "" diff --git a/yazi-config/src/preview/preview.rs b/yazi-config/src/preview/preview.rs index 901d2e54..037303fc 100644 --- a/yazi-config/src/preview/preview.rs +++ b/yazi-config/src/preview/preview.rs @@ -10,6 +10,7 @@ use crate::Xdg; #[derive(Debug, Serialize)] pub struct Preview { pub tab_size: u8, + pub word_wrap: bool, pub max_width: u32, pub max_height: u32, @@ -59,6 +60,7 @@ impl FromStr for Preview { #[derive(Deserialize, Validate)] struct Shadow { tab_size: u8, + word_wrap: bool, max_width: u32, max_height: u32, @@ -85,6 +87,7 @@ impl FromStr for Preview { Ok(Preview { tab_size: preview.tab_size, + word_wrap: preview.word_wrap, max_width: preview.max_width, max_height: preview.max_height,