Files
oak-gpui/crates/repl/src/repl_settings.rs
T
Mikayla MakiandNia 5f8226457e Automate settings registration (#42238)
Release Notes:

- N/A

---------

Co-authored-by: Nia <nia@zed.dev>
2025-11-07 22:27:14 +00:00

28 lines
782 B
Rust

use settings::{RegisterSetting, Settings};
/// Settings for configuring REPL display and behavior.
#[derive(Clone, Debug, RegisterSetting)]
pub struct ReplSettings {
/// Maximum number of lines to keep in REPL's scrollback buffer.
/// Clamped with [4, 256] range.
///
/// Default: 32
pub max_lines: usize,
/// Maximum number of columns to keep in REPL's scrollback buffer.
/// Clamped with [20, 512] range.
///
/// Default: 128
pub max_columns: usize,
}
impl Settings for ReplSettings {
fn from_settings(content: &settings::SettingsContent) -> Self {
let repl = content.repl.as_ref().unwrap();
Self {
max_lines: repl.max_lines.unwrap(),
max_columns: repl.max_columns.unwrap(),
}
}
}