Configuration
Theformatter field accepts a boolean or an object keyed by formatter name:
opencode.jsonc
| Field | Type | Current V2 behavior |
|---|---|---|
disabled | boolean | Accepted, but there is no runtime formatter to enable or disable. |
command | string[] | Accepted as an argument array, but not executed. |
environment | Record<string, string> | Accepts string environment variable names and values, but they are not applied. |
extensions | string[] | Accepted without extension-specific validation, but files are not matched against it. |
"prettier": {}.
Enable and disable
The schema accepts all of the following forms:false, true, and object forms have the same runtime
result: V2 runs no formatter. disabled is retained as configuration data but
does not control an executable formatter.
Commands and placeholders
command is an array of strings, not a shell command string. $FILE is the V1
file-path placeholder and is often retained in migrated configuration. V2 does
not currently substitute $FILE or define another formatter placeholder.
Likewise, V2 does not currently use extensions to select commands, merge
environment into a child process, discover formatter executables or project
configuration, or run multiple matching formatters. These behaviors will only
be available after a V2 formatter runtime is implemented.