extension_cli: Include the list of what an extension provides in the generated manifest (#24295)
This PR updates the Zed extension CLI with support for populating the `provides` field in the generated extension manifest. This field will contain the set of features that the extension provides. For example: ``` "provides": ["themes", "icon-themes"] ``` Release Notes: - N/A
This commit is contained in:
parent
aaf432fcd2
commit
5a25751521
4 changed files with 81 additions and 12 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::collections::BTreeSet;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
@ -11,6 +13,22 @@ pub struct ExtensionApiManifest {
|
|||
pub repository: String,
|
||||
pub schema_version: Option<i32>,
|
||||
pub wasm_api_version: Option<String>,
|
||||
#[serde(default)]
|
||||
pub provides: BTreeSet<ExtensionProvides>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum ExtensionProvides {
|
||||
Themes,
|
||||
IconThemes,
|
||||
Languages,
|
||||
Grammars,
|
||||
LanguageServers,
|
||||
ContextServers,
|
||||
SlashCommands,
|
||||
IndexedDocsProviders,
|
||||
Snippets,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue