fix: cargo fmt actually does not support formatting single files
This commit is contained in:
@@ -347,13 +347,14 @@ export const rustfmt: Info = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cargofmt: Info = {
|
// cargo fmt actually does not support formatting single files
|
||||||
name: "cargofmt",
|
// export const cargofmt: Info = {
|
||||||
command: ["cargo", "fmt", "--", "$FILE"],
|
// name: "cargofmt",
|
||||||
extensions: [".rs"],
|
// command: ["cargo", "fmt", "--", "$FILE"],
|
||||||
async enabled() {
|
// extensions: [".rs"],
|
||||||
if (!Bun.which("cargo")) return false
|
// async enabled() {
|
||||||
const found = await Filesystem.findUp("Cargo.toml", Instance.directory, Instance.worktree)
|
// if (!Bun.which("cargo")) return false
|
||||||
return found.length > 0
|
// const found = await Filesystem.findUp("Cargo.toml", Instance.directory, Instance.worktree)
|
||||||
},
|
// return found.length > 0
|
||||||
}
|
// },
|
||||||
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user