Extension refactor (#20305)
This contains the main changes to the extensions crate from #20049. The primary goal here is removing dependencies that we can't include on the remote. Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
f22e56ff42
commit
608addf641
30 changed files with 675 additions and 236 deletions
|
@ -165,6 +165,22 @@ pub fn extensions_dir() -> &'static PathBuf {
|
|||
EXTENSIONS_DIR.get_or_init(|| support_dir().join("extensions"))
|
||||
}
|
||||
|
||||
/// Returns the path to the extensions directory.
|
||||
///
|
||||
/// This is where installed extensions are stored on a remote.
|
||||
pub fn remote_extensions_dir() -> &'static PathBuf {
|
||||
static EXTENSIONS_DIR: OnceLock<PathBuf> = OnceLock::new();
|
||||
EXTENSIONS_DIR.get_or_init(|| support_dir().join("remote_extensions"))
|
||||
}
|
||||
|
||||
/// Returns the path to the extensions directory.
|
||||
///
|
||||
/// This is where installed extensions are stored on a remote.
|
||||
pub fn remote_extensions_uploads_dir() -> &'static PathBuf {
|
||||
static UPLOAD_DIR: OnceLock<PathBuf> = OnceLock::new();
|
||||
UPLOAD_DIR.get_or_init(|| remote_extensions_dir().join("uploads"))
|
||||
}
|
||||
|
||||
/// Returns the path to the themes directory.
|
||||
///
|
||||
/// This is where themes that are not provided by extensions are stored.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue