Skip to content

Commit 7305bcf

Browse files
codeimeguobing
andauthored
feat: VSCodeVariant add windsurf (#125)
* feat: VSCodeVariant add windsurf * feat: add windsurf support --------- Co-authored-by: guobing <[email protected]>
1 parent e76d8e2 commit 7305bcf

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/fig_integrations/src/vscode/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ pub static VARIANTS: &[VSCodeVariant] = &[
7272
application_name: "Cursor Nightly",
7373
cli_executable_name: "cursor-nightly",
7474
},
75+
VSCodeVariant {
76+
bundle_identifier: "com.exafunction.windsurf",
77+
config_folder_name: ".windsurf",
78+
application_support_folder_name: "Windsurf",
79+
application_name: "Windsurf",
80+
cli_executable_name: "windsurf",
81+
},
7582
];
7683

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

crates/fig_util/src/terminal.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub const MACOS_TERMINALS: &[Terminal] = &[
2323
Terminal::Cursor,
2424
Terminal::CursorNightly,
2525
Terminal::Rio,
26+
Terminal::Windsurf,
2627
];
2728

2829
/// Terminals that Linux supports
@@ -132,6 +133,8 @@ pub enum Terminal {
132133
Nvim,
133134
/// Zellij
134135
Zellij,
136+
/// Windsurf
137+
Windsurf,
135138
}
136139

137140
impl fmt::Display for Terminal {
@@ -166,6 +169,7 @@ impl fmt::Display for Terminal {
166169
Terminal::Cursor => write!(f, "Cursor"),
167170
Terminal::CursorNightly => write!(f, "Cursor Nightly"),
168171
Terminal::Rio => write!(f, "Rio"),
172+
Terminal::Windsurf => write!(f, "Windsurf"),
169173
}
170174
}
171175
}
@@ -317,6 +321,7 @@ impl Terminal {
317321
Terminal::Cursor => "cursor".into(),
318322
Terminal::CursorNightly => "cursor-nightly".into(),
319323
Terminal::Rio => "rio".into(),
324+
Terminal::Windsurf => "windsurf".into(),
320325
}
321326
}
322327

@@ -341,6 +346,7 @@ impl Terminal {
341346
Terminal::Cursor => Some("com.todesktop.230313mzl4w4u92".into()),
342347
Terminal::CursorNightly => Some("com.todesktop.23052492jqa5xjo".into()),
343348
Terminal::Rio => Some("com.raphaelamorim.rio".into()),
349+
Terminal::Windsurf => Some("com.exafunction.windsurf".into()),
344350
_ => None,
345351
}
346352
}
@@ -363,6 +369,7 @@ impl Terminal {
363369
"com.todesktop.230313mzl4w4u92" => Terminal::Cursor,
364370
"com.todesktop.23052492jqa5xjo" => Terminal::CursorNightly,
365371
"com.raphaelamorim.rio" => Terminal::Rio,
372+
"com.exafunction.windsurf" => Terminal::Windsurf,
366373
// todo(mschrage): the following line does not account for Android Studio
367374
_ if bundle.starts_with("com.jetbrains.") | bundle.starts_with("com.google.") => {
368375
Terminal::IntelliJ(IntelliJVariant::from_bundle_id(bundle))
@@ -409,6 +416,7 @@ impl Terminal {
409416
| Terminal::Tabby
410417
| Terminal::Cursor
411418
| Terminal::CursorNightly
419+
| Terminal::Windsurf
412420
)
413421
}
414422

@@ -432,6 +440,7 @@ impl Terminal {
432440
Terminal::Cursor => &["Cursor", "cursor"],
433441
Terminal::CursorNightly => &["Cursor Nightly", "cursor-nightly"],
434442
Terminal::Rio => &["rio"],
443+
Terminal::Windsurf => &["windsurf"],
435444

436445
Terminal::Ssh => &["sshd"],
437446
Terminal::Tmux => &["tmux", "tmux: server"],
@@ -496,6 +505,7 @@ impl Terminal {
496505
| Terminal::VSCodium
497506
| Terminal::Cursor
498507
| Terminal::CursorNightly
508+
| Terminal::Windsurf
499509
)
500510
}
501511

0 commit comments

Comments
 (0)