[PR #3753] feat: Allowing for wildcards in formatter exts #10749

Closed
opened 2026-02-16 18:15:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3753

State: closed
Merged: No


feat: Allowing for wildcards in formatter extenstions, utilizing already existing Wildcards utils

Solved issue #3431

Tested with this config and it works

{
    "$schema": "https://opencode.ai/config.json",
    "formatter": {
    "prettier": {
        "extensions": [".ts"],
        "command": ["npx", "prettier", "--write", "$FILE"],
        "enabled": true
      },
      "biome": {
        "extensions": ["*.test.ts"],
        "command": ["npx", "@biomejs/biome", "format", "--write", "$FILE"],
        "enabled": true
      }
    }
}

@rekram1-node I want to ask,

  • If a user mistakely enables two formatters for a single file type what should be the system's response?
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3753 **State:** closed **Merged:** No --- feat: Allowing for wildcards in formatter extenstions, utilizing already existing [Wildcards utils](https://github.com/sst/opencode/blob/dev/packages/opencode/src/util/wildcard.ts) Solved issue #3431 Tested with this config and it works ```json { "$schema": "https://opencode.ai/config.json", "formatter": { "prettier": { "extensions": [".ts"], "command": ["npx", "prettier", "--write", "$FILE"], "enabled": true }, "biome": { "extensions": ["*.test.ts"], "command": ["npx", "@biomejs/biome", "format", "--write", "$FILE"], "enabled": true } } } ``` @rekram1-node I want to ask, - If a user mistakely enables two formatters for a single file type what should be the system's response?
yindo added the pull-request label 2026-02-16 18:15:29 -05:00
yindo closed this issue 2026-02-16 18:15:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10749