mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-17 23:56:55 +00:00
48553d7c8f
This reverts commit c0f042b39a
.
38 lines
1,010 B
Rust
38 lines
1,010 B
Rust
mod keymap_file;
|
|
mod settings_file;
|
|
mod settings_store;
|
|
|
|
use rust_embed::RustEmbed;
|
|
use std::{borrow::Cow, str};
|
|
use util::asset_str;
|
|
|
|
pub use keymap_file::KeymapFile;
|
|
pub use settings_file::*;
|
|
pub use settings_store::{Setting, SettingsJsonSchemaParams, SettingsStore};
|
|
|
|
#[derive(RustEmbed)]
|
|
#[folder = "../../assets"]
|
|
#[include = "settings/*"]
|
|
#[include = "keymaps/*"]
|
|
#[exclude = "*.DS_Store"]
|
|
pub struct SettingsAssets;
|
|
|
|
pub fn default_settings() -> Cow<'static, str> {
|
|
asset_str::<SettingsAssets>("settings/default.json")
|
|
}
|
|
|
|
pub fn default_keymap() -> Cow<'static, str> {
|
|
asset_str::<SettingsAssets>("keymaps/default.json")
|
|
}
|
|
|
|
pub fn vim_keymap() -> Cow<'static, str> {
|
|
asset_str::<SettingsAssets>("keymaps/vim.json")
|
|
}
|
|
|
|
pub fn initial_user_settings_content() -> Cow<'static, str> {
|
|
asset_str::<SettingsAssets>("settings/initial_user_settings.json")
|
|
}
|
|
|
|
pub fn initial_local_settings_content() -> Cow<'static, str> {
|
|
asset_str::<SettingsAssets>("settings/initial_local_settings.json")
|
|
}
|