1use std::sync::Mutex;
4
5use once_cell::sync::Lazy;
6
7use crate::ui::RenderConfig;
8
9static GLOBAL_RENDER_CONFIGURATION: Lazy<Mutex<RenderConfig<'static>>> =
10 Lazy::new(|| Mutex::new(RenderConfig::default()));
11
12pub fn get_configuration() -> RenderConfig<'static> {
13 *GLOBAL_RENDER_CONFIGURATION.lock().unwrap()
14}
15
16pub fn set_global_render_config(config: RenderConfig<'static>) {
19 let mut guard = GLOBAL_RENDER_CONFIGURATION.lock().unwrap();
20 *guard = config;
21}
22
23pub const DEFAULT_PAGE_SIZE: usize = 7;
25
26pub const DEFAULT_VIM_MODE: bool = false;