1mod font_size;
2mod keymap_file;
3mod settings_file;
4mod settings_store;
5
6use std::{borrow::Cow, str};
7
8pub use font_size::{adjust_font_size_delta, font_size_for_setting};
9use gpui::AssetSource;
10pub use keymap_file::{keymap_file_json_schema, KeymapFileContent};
11pub use settings_file::*;
12pub use settings_store::{Setting, SettingsJsonSchemaParams, SettingsStore};
13
14pub const DEFAULT_SETTINGS_ASSET_PATH: &str = "settings/default.json";
15pub const INITIAL_USER_SETTINGS_ASSET_PATH: &str = "settings/initial_user_settings.json";
16
17pub fn initial_user_settings_content(assets: &'static impl AssetSource) -> Cow<'static, str> {
18 match assets.load(INITIAL_USER_SETTINGS_ASSET_PATH).unwrap() {
19 Cow::Borrowed(s) => Cow::Borrowed(str::from_utf8(s).unwrap()),
20 Cow::Owned(s) => Cow::Owned(String::from_utf8(s).unwrap()),
21 }
22}