Просмотр исходного кода

fix(docs): Document `cargofmt` (#7383)

Marc Espin 1 месяц назад
Родитель
Сommit
768e0553bd

+ 1 - 1
packages/opencode/src/format/formatter.ts

@@ -348,7 +348,7 @@ export const rustfmt: Info = {
 }
 
 export const cargofmt: Info = {
-  name: "cargo fmt",
+  name: "cargofmt",
   command: ["cargo", "fmt", "--", "$FILE"],
   extensions: [".rs"],
   async enabled() {

+ 1 - 0
packages/web/src/content/docs/formatters.mdx

@@ -22,6 +22,7 @@ OpenCode comes with several built-in formatters for popular languages and framew
 | ktlint               | .kt, .kts                                                                                                | `ktlint` command available                                                                            |
 | ruff                 | .py, .pyi                                                                                                | `ruff` command available with config                                                                  |
 | rustfmt              | .rs                                                                                                      | `rustfmt` command available                                                                           |
+| cargofmt            | .rs                                                                                                      | `cargo fmt` command available                                                                          |
 | uv                   | .py, .pyi                                                                                                | `uv` command available                                                                                |
 | rubocop              | .rb, .rake, .gemspec, .ru                                                                                | `rubocop` command available                                                                           |
 | standardrb           | .rb, .rake, .gemspec, .ru                                                                                | `standardrb` command available                                                                        |