1use std::sync::Mutex;
4
5use lazy_static::lazy_static;
6
7use crate::ui::RenderConfig;
8
9lazy_static! {
10 static ref GLOBAL_RENDER_CONFIGURATION: Mutex<RenderConfig> =
11 Mutex::new(RenderConfig::default());
12}
13
14pub fn get_configuration() -> RenderConfig {
15 *GLOBAL_RENDER_CONFIGURATION.lock().unwrap()
16}
17
18pub fn set_global_render_config(config: RenderConfig) {
21 let mut guard = GLOBAL_RENDER_CONFIGURATION.lock().unwrap();
22 *guard = config;
23}
24
25pub const DEFAULT_PAGE_SIZE: usize = 7;
27
28pub const DEFAULT_VIM_MODE: bool = false;