@@ -13,31 +13,31 @@ OpenCode comes with several built-in formatters for popular languages and framew
1313
1414| Formatter | Extensions | Requirements |
1515| -------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
16- | gofmt | .go | ` gofmt ` command available |
17- | mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | ` mix ` command available |
18- | prettier | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [ more] ( https://prettier.io/docs/en/index.html ) | ` prettier ` dependency in ` package.json ` |
16+ | air | .R | ` air ` command available |
1917| biome | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [ more] ( https://biomejs.dev/ ) | ` biome.json(c) ` config file |
20- | zig | .zig, .zon | ` zig ` command available |
18+ | cargofmt | .rs | ` cargo fmt ` command available |
2119| clang-format | .c, .cpp, .h, .hpp, .ino, and [ more] ( https://clang.llvm.org/docs/ClangFormat.html ) | ` .clang-format ` config file |
20+ | cljfmt | .clj, .cljs, .cljc, .edn | ` cljfmt ` command available |
21+ | dart | .dart | ` dart ` command available |
22+ | gleam | .gleam | ` gleam ` command available |
23+ | gofmt | .go | ` gofmt ` command available |
24+ | htmlbeautifier | .erb, .html.erb | ` htmlbeautifier ` command available |
2225| ktlint | .kt, .kts | ` ktlint ` command available |
26+ | mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | ` mix ` command available |
27+ | nixfmt | .nix | ` nixfmt ` command available |
28+ | ocamlformat | .ml, .mli | ` ocamlformat ` command available and ` .ocamlformat ` config file |
29+ | ormolu | .hs | ` ormolu ` command available |
30+ | oxfmt (Experimental) | .js, .jsx, .ts, .tsx | ` oxfmt ` dependency in ` package.json ` and an [ experimental env variable flag] ( /docs/cli/#experimental ) |
31+ | pint | .php | ` laravel/pint ` dependency in ` composer.json ` |
32+ | prettier | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [ more] ( https://prettier.io/docs/en/index.html ) | ` prettier ` dependency in ` package.json ` |
33+ | rubocop | .rb, .rake, .gemspec, .ru | ` rubocop ` command available |
2334| ruff | .py, .pyi | ` ruff ` command available with config |
2435| rustfmt | .rs | ` rustfmt ` command available |
25- | cargofmt | .rs | ` cargo fmt ` command available |
26- | uv | .py, .pyi | ` uv ` command available |
27- | rubocop | .rb, .rake, .gemspec, .ru | ` rubocop ` command available |
36+ | shfmt | .sh, .bash | ` shfmt ` command available |
2837| standardrb | .rb, .rake, .gemspec, .ru | ` standardrb ` command available |
29- | htmlbeautifier | .erb, .html.erb | ` htmlbeautifier ` command available |
30- | air | .R | ` air ` command available |
31- | dart | .dart | ` dart ` command available |
32- | ocamlformat | .ml, .mli | ` ocamlformat ` command available and ` .ocamlformat ` config file |
3338| terraform | .tf, .tfvars | ` terraform ` command available |
34- | gleam | .gleam | ` gleam ` command available |
35- | nixfmt | .nix | ` nixfmt ` command available |
36- | shfmt | .sh, .bash | ` shfmt ` command available |
37- | pint | .php | ` laravel/pint ` dependency in ` composer.json ` |
38- | oxfmt (Experimental) | .js, .jsx, .ts, .tsx | ` oxfmt ` dependency in ` package.json ` and an [ experimental env variable flag] ( /docs/cli/#experimental ) |
39- | ormolu | .hs | ` ormolu ` command available |
40- | cljfmt | .clj, .cljs, .cljc, .edn | ` cljfmt ` command available |
39+ | uv | .py, .pyi | ` uv ` command available |
40+ | zig | .zig, .zon | ` zig ` command available |
4141
4242So if your project has ` prettier ` in your ` package.json ` , OpenCode will automatically use it.
4343
0 commit comments