Skip to content

Commit 87ee68e

Browse files
authored
feat: add support for Positron terminal (#406)
* added positron support * fmt
1 parent fcd4003 commit 87ee68e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

crates/fig_integrations/src/vscode/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ pub static VARIANTS: &[VSCodeVariant] = &[
7979
application_name: "Windsurf",
8080
cli_executable_name: "windsurf",
8181
},
82+
VSCodeVariant {
83+
bundle_identifier: "co.posit.positron",
84+
config_folder_name: ".positron",
85+
application_support_folder_name: "Positron",
86+
application_name: "Positron",
87+
cli_executable_name: "positron",
88+
},
8289
];
8390

8491
pub fn variants_installed() -> Vec<VSCodeVariant> {

crates/fig_util/src/terminal.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub const MACOS_TERMINALS: &[Terminal] = &[
2525
Terminal::Rio,
2626
Terminal::Windsurf,
2727
Terminal::Ghostty,
28+
Terminal::Positron,
2829
];
2930

3031
/// Terminals that Linux supports
@@ -44,6 +45,7 @@ pub const LINUX_TERMINALS: &[Terminal] = &[
4445
Terminal::VSCodeInsiders,
4546
Terminal::VSCodium,
4647
Terminal::IntelliJ(None),
48+
Terminal::Positron,
4749
];
4850

4951
/// Other terminals that figterm should launch within that are not full terminal emulators
@@ -161,6 +163,8 @@ pub enum Terminal {
161163
Windsurf,
162164
/// Ghostty
163165
Ghostty,
166+
/// Positron
167+
Positron,
164168

165169
/// Custom terminal to support user/custom entries
166170
Custom(CustomTerminal),
@@ -201,6 +205,7 @@ impl fmt::Display for Terminal {
201205
Terminal::Windsurf => write!(f, "Windsurf"),
202206
Terminal::Guake => write!(f, "Guake"),
203207
Terminal::Ghostty => write!(f, "Ghostty"),
208+
Terminal::Positron => write!(f, "Positron"),
204209
Terminal::Custom(custom_terminal) => write!(f, "{}", custom_terminal.name),
205210
}
206211
}
@@ -365,6 +370,7 @@ impl Terminal {
365370
Terminal::Windsurf => "windsurf".into(),
366371
Terminal::Guake => "guake".into(),
367372
Terminal::Ghostty => "ghostty".into(),
373+
Terminal::Positron => "positron".into(),
368374
Terminal::Custom(custom_terminal) => custom_terminal.id.clone().into(),
369375
}
370376
}
@@ -392,6 +398,7 @@ impl Terminal {
392398
Terminal::Rio => Some("com.raphaelamorim.rio".into()),
393399
Terminal::Windsurf => Some("com.exafunction.windsurf".into()),
394400
Terminal::Ghostty => Some("com.mitchellh.ghostty".into()),
401+
Terminal::Positron => Some("co.posit.positron".into()),
395402
Terminal::Custom(custom_terminal) => custom_terminal.macos.bundle_id.clone().map(Cow::Owned),
396403
_ => None,
397404
}
@@ -417,6 +424,7 @@ impl Terminal {
417424
"com.raphaelamorim.rio" => Terminal::Rio,
418425
"com.exafunction.windsurf" => Terminal::Windsurf,
419426
"com.mitchellh.ghostty" => Terminal::Ghostty,
427+
"co.posit.positron" => Terminal::Positron,
420428
// TODO: the following line does not account for Android Studio
421429
_ if bundle.starts_with("com.jetbrains.") | bundle.starts_with("com.google.") => {
422430
Terminal::IntelliJ(IntelliJVariant::from_bundle_id(bundle))
@@ -491,6 +499,7 @@ impl Terminal {
491499
Terminal::Windsurf => &["windsurf"],
492500
Terminal::Guake => &["guake"],
493501
Terminal::Ghostty => &["ghostty"],
502+
Terminal::Positron => &["positron"],
494503

495504
Terminal::Ssh => &["sshd"],
496505
Terminal::Tmux => &["tmux", "tmux: server"],

0 commit comments

Comments
 (0)