Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Merge branch 'main' into kvark-linux
Mikayla3a53db650221
diff --cc crates/util/src/paths.rsindex 9e4bd0ab361,dcf9270fb17..45f430c52a2--- a/crates/util/src/paths.rs+++ b/crates/util/src/paths.rs@@@ -9,54 -9,18 +9,59 @@@ use serde::{Deserialize, Serialize}lazy_static::lazy_static! {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 CONVERSATIONS_DIR: PathBuf = HOME.join(".config/zed/conversations");- pub static ref EMBEDDINGS_DIR: PathBuf = HOME.join(".config/zed/embeddings");- pub static ref THEMES_DIR: PathBuf = HOME.join(".config/zed/themes");- pub static ref LOGS_DIR: PathBuf = HOME.join("Library/Logs/Zed");- pub static ref SUPPORT_DIR: PathBuf = HOME.join("Library/Application Support/Zed");- pub static ref EXTENSIONS_DIR: PathBuf = HOME.join("Library/Application Support/Zed/extensions");- pub static ref LANGUAGES_DIR: PathBuf = HOME.join("Library/Application Support/Zed/languages");- pub static ref COPILOT_DIR: PathBuf = HOME.join("Library/Application Support/Zed/copilot");- pub static ref DEFAULT_PRETTIER_DIR: PathBuf = HOME.join("Library/Application Support/Zed/prettier");- pub static ref DB_DIR: PathBuf = HOME.join("Library/Application Support/Zed/db");- pub static ref CRASHES_DIR: PathBuf = HOME.join("Library/Logs/DiagnosticReports");- pub static ref CRASHES_RETIRED_DIR: PathBuf = HOME.join("Library/Logs/DiagnosticReports/Retired");+ pub static ref CONVERSATIONS_DIR: PathBuf = CONFIG_DIR.join("conversations");+ pub static ref EMBEDDINGS_DIR: PathBuf = CONFIG_DIR.join("embeddings");+ pub static ref THEMES_DIR: PathBuf = CONFIG_DIR.join("themes");+ pub static ref LOGS_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Logs/Zed")+ } else {+ CONFIG_DIR.join("logs")+ };+ pub static ref SUPPORT_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed")+ } else {+ CONFIG_DIR.join("support")+ };++ pub static ref EXTENSIONS_DIR: PathBuf = if cfg!(target_os="macos") {++ HOME.join("Library/Application Support/Zed")++ } else {++ CONFIG_DIR.join("extensions")++ };+ pub static ref PLUGINS_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed/plugins")+ } else {+ CONFIG_DIR.join("plugins")+ };+ pub static ref LANGUAGES_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed/languages")+ } else {+ CONFIG_DIR.join("languages")+ };+ pub static ref COPILOT_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed/copilot")+ } else {+ CONFIG_DIR.join("copilot")+ };+ pub static ref DEFAULT_PRETTIER_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed/prettier")+ } else {+ CONFIG_DIR.join("prettier")+ };+ pub static ref DB_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Application Support/Zed/db")+ } else {+ CONFIG_DIR.join("db")+ };+ pub static ref CRASHES_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Logs/DiagnosticReports")+ } else {+ CONFIG_DIR.join("crashes")+ };+ pub static ref CRASHES_RETIRED_DIR: PathBuf = if cfg!(target_os="macos") {+ HOME.join("Library/Logs/DiagnosticReports/Retired")+ } else {+ CRASHES_DIR.join("retired")+ };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");diff --cc crates/zed/src/languages.rsindex 778606421f3,2931d537632..43e92fb0ae5--- a/crates/zed/src/languages.rs+++ b/crates/zed/src/languages.rs@@@ -282,12 -264,8 +264,11 @@@ pub fn init],);+ // Produces a link error on linux due to duplicated `state_new` symbol+ // todo!(linux): Restore purescript+ #[cfg(not(target_os = "linux"))]language("purescript",- tree_sitter_purescript::language(),vec![Arc::new(purescript::PurescriptLspAdapter::new(node_runtime.clone(),))],diff --cc crates/zed/src/main.rsindex 5a535cb5366,83eaa1de104..5cdc2387778--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@@ -174,8 -173,9 +174,10 @@@ fn main());assistant::init(cx);+ extension::init(fs.clone(), languages.clone(), ThemeRegistry::global(cx), cx);+load_user_themes_in_background(fs.clone(), cx);+ #[cfg(target_os = "macos")]watch_themes(fs.clone(), cx);cx.spawn(|_| watch_languages(fs.clone(), languages.clone()))