Skip to content

Instantly share code, notes, and snippets.

@tindzk
Created August 10, 2024 07:45
Show Gist options
  • Save tindzk/4515c859182fa1bb9a0281582e303192 to your computer and use it in GitHub Desktop.
Save tindzk/4515c859182fa1bb9a0281582e303192 to your computer and use it in GitHub Desktop.
Using cargo-limit with Zed
diff --git a/crates/languages/src/rust.rs b/crates/languages/src/rust.rs
index ebf1d0d0e3..d2c5bf4d85 100644
--- a/crates/languages/src/rust.rs
+++ b/crates/languages/src/rust.rs
@@ -469,13 +469,13 @@ impl ContextProvider for RustContextProvider {
},
TaskTemplate {
label: format!(
- "cargo test -p {} {} -- --nocapture",
+ "cargo ltest -p {} {} -- --nocapture",
RUST_PACKAGE_TASK_VARIABLE.template_value(),
VariableName::Symbol.template_value(),
),
command: "cargo".into(),
args: vec![
- "test".into(),
+ "ltest".into(),
"-p".into(),
RUST_PACKAGE_TASK_VARIABLE.template_value(),
VariableName::Symbol.template_value(),
@@ -488,13 +488,13 @@ impl ContextProvider for RustContextProvider {
},
TaskTemplate {
label: format!(
- "cargo test -p {} {}",
+ "cargo ltest -p {} {}",
RUST_PACKAGE_TASK_VARIABLE.template_value(),
VariableName::Stem.template_value(),
),
command: "cargo".into(),
args: vec![
- "test".into(),
+ "ltest".into(),
"-p".into(),
RUST_PACKAGE_TASK_VARIABLE.template_value(),
VariableName::Stem.template_value(),
@@ -505,13 +505,13 @@ impl ContextProvider for RustContextProvider {
},
TaskTemplate {
label: format!(
- "cargo run -p {} --bin {}",
+ "cargo lrun -p {} --bin {}",
RUST_PACKAGE_TASK_VARIABLE.template_value(),
RUST_BIN_NAME_TASK_VARIABLE.template_value(),
),
command: "cargo".into(),
args: vec![
- "run".into(),
+ "lrun".into(),
"-p".into(),
RUST_PACKAGE_TASK_VARIABLE.template_value(),
"--bin".into(),
@@ -523,12 +523,12 @@ impl ContextProvider for RustContextProvider {
},
TaskTemplate {
label: format!(
- "cargo test -p {}",
+ "cargo ltest -p {}",
RUST_PACKAGE_TASK_VARIABLE.template_value()
),
command: "cargo".into(),
args: vec![
- "test".into(),
+ "ltest".into(),
"-p".into(),
RUST_PACKAGE_TASK_VARIABLE.template_value(),
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment