Restored chat_panel, just in case

This commit is contained in:
Mikayla Maki
2022-10-19 11:42:29 -07:00
97 changed files with 2632 additions and 1767 deletions
+6 -6
View File
@@ -23,7 +23,7 @@ use isahc::{config::Configurable, Request};
use language::LanguageRegistry;
use log::LevelFilter;
use parking_lot::Mutex;
use project::{Fs, ProjectStore};
use project::{Fs, HomeDir, ProjectStore};
use serde_json::json;
use settings::{
self, settings_file::SettingsFile, KeymapFileContent, Settings, SettingsFileContent,
@@ -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);
@@ -99,6 +97,8 @@ fn main() {
let (settings_file_content, keymap_file) = cx.background().block(config_files).unwrap();
cx.set_global(HomeDir(zed::paths::HOME.to_path_buf()));
//Setup settings global before binding actions
cx.set_global(SettingsFile::new(
&*zed::paths::SETTINGS,
+1 -2
View File
@@ -1,12 +1,11 @@
use std::path::PathBuf;
lazy_static::lazy_static! {
static ref HOME: PathBuf = dirs::home_dir().expect("failed to determine home directory");
pub static ref HOME: PathBuf = dirs::home_dir().expect("failed to determine home directory");
pub static ref CONFIG_DIR: PathBuf = HOME.join(".config").join("zed");
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,
]
);