aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/install.rs20
-rw-r--r--xtask/src/main.rs2
2 files changed, 15 insertions, 7 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index 78a8af797..12962bcfa 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -16,6 +16,7 @@ pub struct InstallCmd {
16#[derive(Clone, Copy)] 16#[derive(Clone, Copy)]
17pub enum ClientOpt { 17pub enum ClientOpt {
18 VsCode, 18 VsCode,
19 VsCodeExploration,
19 VsCodeInsiders, 20 VsCodeInsiders,
20 VsCodium, 21 VsCodium,
21 VsCodeOss, 22 VsCodeOss,
@@ -26,10 +27,11 @@ impl ClientOpt {
26 pub const fn as_cmds(&self) -> &'static [&'static str] { 27 pub const fn as_cmds(&self) -> &'static [&'static str] {
27 match self { 28 match self {
28 ClientOpt::VsCode => &["code"], 29 ClientOpt::VsCode => &["code"],
30 ClientOpt::VsCodeExploration => &["code-exploration"],
29 ClientOpt::VsCodeInsiders => &["code-insiders"], 31 ClientOpt::VsCodeInsiders => &["code-insiders"],
30 ClientOpt::VsCodium => &["codium"], 32 ClientOpt::VsCodium => &["codium"],
31 ClientOpt::VsCodeOss => &["code-oss"], 33 ClientOpt::VsCodeOss => &["code-oss"],
32 ClientOpt::Any => &["code", "code-insiders", "codium", "code-oss"], 34 ClientOpt::Any => &["code", "code-exploration", "code-insiders", "codium", "code-oss"],
33 } 35 }
34 } 36 }
35} 37}
@@ -44,11 +46,17 @@ impl std::str::FromStr for ClientOpt {
44 type Err = anyhow::Error; 46 type Err = anyhow::Error;
45 47
46 fn from_str(s: &str) -> Result<Self, Self::Err> { 48 fn from_str(s: &str) -> Result<Self, Self::Err> {
47 [ClientOpt::VsCode, ClientOpt::VsCodeInsiders, ClientOpt::VsCodium, ClientOpt::VsCodeOss] 49 [
48 .iter() 50 ClientOpt::VsCode,
49 .copied() 51 ClientOpt::VsCodeExploration,
50 .find(|c| [s] == c.as_cmds()) 52 ClientOpt::VsCodeInsiders,
51 .ok_or_else(|| anyhow::format_err!("no such client")) 53 ClientOpt::VsCodium,
54 ClientOpt::VsCodeOss,
55 ]
56 .iter()
57 .copied()
58 .find(|c| [s] == c.as_cmds())
59 .ok_or_else(|| anyhow::format_err!("no such client"))
52 } 60 }
53} 61}
54 62
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 536a67047..3e07daae9 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -47,7 +47,7 @@ USAGE:
47 47
48FLAGS: 48FLAGS:
49 --client[=CLIENT] Install only VS Code plugin. 49 --client[=CLIENT] Install only VS Code plugin.
50 CLIENT is one of 'code', 'code-insiders', 'codium', or 'code-oss' 50 CLIENT is one of 'code', 'code-exploration', 'code-insiders', 'codium', or 'code-oss'
51 --server Install only the language server 51 --server Install only the language server
52 --mimalloc Use mimalloc for server 52 --mimalloc Use mimalloc for server
53 -h, --help Prints help information 53 -h, --help Prints help information