Merge pull request #1773 from zed-industries/rusqlite

Swap to sqlite for client persistence
This commit is contained in:
Kay Simmons
2022-10-18 16:11:54 -07:00
committed by GitHub
12 changed files with 500 additions and 156 deletions
+3 -5
View File
@@ -52,11 +52,9 @@ fn main() {
.or_else(|| app.platform().app_version().ok())
.map_or("dev".to_string(), |v| v.to_string());
init_panic_hook(app_version, http.clone(), app.background());
let db = app.background().spawn(async move {
project::Db::open(&*zed::paths::DB)
.log_err()
.unwrap_or_else(project::Db::null)
});
let db = app
.background()
.spawn(async move { project::Db::open(&*zed::paths::DB_DIR) });
load_embedded_fonts(&app);
-1
View File
@@ -6,7 +6,6 @@ lazy_static::lazy_static! {
pub static ref LOGS_DIR: PathBuf = HOME.join("Library/Logs/Zed");
pub static ref LANGUAGES_DIR: PathBuf = HOME.join("Library/Application Support/Zed/languages");
pub static ref DB_DIR: PathBuf = HOME.join("Library/Application Support/Zed/db");
pub static ref DB: PathBuf = DB_DIR.join("zed.db");
pub static ref SETTINGS: PathBuf = CONFIG_DIR.join("settings.json");
pub static ref KEYMAP: PathBuf = CONFIG_DIR.join("keymap.json");
pub static ref LAST_USERNAME: PathBuf = CONFIG_DIR.join("last-username.txt");
+1
View File
@@ -63,6 +63,7 @@ actions!(
DecreaseBufferFontSize,
ResetBufferFontSize,
InstallCommandLineInterface,
ResetDatabase,
]
);