diff options
| author | Dax Raad <[email protected]> | 2025-09-09 23:43:37 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-09-09 23:44:04 -0400 |
| commit | 38e8c42cf02f73fb300889ab989088899a3aedb7 (patch) | |
| tree | 313db96535cf136cc1032618b43462c1f2f0e14c /packages/web/src/content/docs/formatters.mdx | |
| parent | 58fe88432714456350244ebbea1e6287d3dccb36 (diff) | |
| download | opencode-38e8c42cf02f73fb300889ab989088899a3aedb7.tar.gz opencode-38e8c42cf02f73fb300889ab989088899a3aedb7.zip | |
ci: format
Diffstat (limited to 'packages/web/src/content/docs/formatters.mdx')
| -rw-r--r-- | packages/web/src/content/docs/formatters.mdx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/web/src/content/docs/formatters.mdx b/packages/web/src/content/docs/formatters.mdx index 9c9411aeb..5c00c3ca7 100644 --- a/packages/web/src/content/docs/formatters.mdx +++ b/packages/web/src/content/docs/formatters.mdx @@ -11,19 +11,19 @@ opencode automatically formats files after they are written or edited using lang opencode comes with several built-in formatters for popular languages and frameworks. Below is a list of the formatters, supported file extensions, and commands or config options it needs. -| Formatter | Extensions | Requirements | -| -------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| gofmt | .go | `gofmt` command available | -| mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | `mix` command available | +| Formatter | Extensions | Requirements | +| -------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------- | +| gofmt | .go | `gofmt` command available | +| mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | `mix` command available | | prettier | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [more](https://prettier.io/docs/en/index.html) | `prettier` dependency in `package.json` | -| biome | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [more](https://biomejs.dev/) | `biome.json(c)` config file | -| zig | .zig, .zon | `zig` command available | -| clang-format | .c, .cpp, .h, .hpp, .ino, and [more](https://clang.llvm.org/docs/ClangFormat.html) | `.clang-format` config file | -| ktlint | .kt, .kts | `ktlint` command available | -| ruff | .py, .pyi | `ruff` command available with config | -| rubocop | .rb, .rake, .gemspec, .ru | `rubocop` command available | -| standardrb | .rb, .rake, .gemspec, .ru | `standardrb` command available | -| htmlbeautifier | .erb, .html.erb | `htmlbeautifier` command available | +| biome | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, and [more](https://biomejs.dev/) | `biome.json(c)` config file | +| zig | .zig, .zon | `zig` command available | +| clang-format | .c, .cpp, .h, .hpp, .ino, and [more](https://clang.llvm.org/docs/ClangFormat.html) | `.clang-format` config file | +| ktlint | .kt, .kts | `ktlint` command available | +| ruff | .py, .pyi | `ruff` command available with config | +| rubocop | .rb, .rake, .gemspec, .ru | `rubocop` command available | +| standardrb | .rb, .rake, .gemspec, .ru | `standardrb` command available | +| htmlbeautifier | .erb, .html.erb | `htmlbeautifier` command available | So if your project has `prettier` in your `package.json`, opencode will automatically use it. @@ -48,7 +48,7 @@ You can customize formatters through the `formatter` section in your opencode co ```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", - "formatter": { } + "formatter": {} } ``` @@ -56,7 +56,7 @@ Each formatter configuration supports the following: | Property | Type | Description | | ------------- | -------- | ------------------------------------------------------- | -| `disabled` | boolean | Set this to `true` to disable the formatter | +| `disabled` | boolean | Set this to `true` to disable the formatter | | `command` | string[] | The command to run for formatting | | `environment` | object | Environment variables to set when running the formatter | | `extensions` | string[] | File extensions this formatter should handle | |
