Skip to content

fix(config): preserve formatter config from opencode settings#2147

Merged
code-yeongyu merged 1 commit intodevfrom
fix/issue-2117-preserve-formatter-config
Feb 26, 2026
Merged

fix(config): preserve formatter config from opencode settings#2147
code-yeongyu merged 1 commit intodevfrom
fix/issue-2117-preserve-formatter-config

Conversation

@code-yeongyu
Copy link
Copy Markdown
Owner

@code-yeongyu code-yeongyu commented Feb 26, 2026

Problem

Formatters defined in opencode's configuration don't work because the oh-my-opencode plugin drops the formatter field during config processing.

Root Cause

config-handler.ts doesn't preserve the formatter field when processing OpenCode configuration.

Fix

Preserve the formatter configuration in the config handler pipeline.

Test

  • Added src/plugin-handlers/config-handler-formatter.test.ts to verify both object and false formatter values are preserved.

Closes #2117


Summary by cubic

Preserves the formatter setting from OpenCode config in the oh-my-opencode config handler so configured formatters are respected. Closes #2117.

  • Bug Fixes
    • Save formatter before the handler pipeline and restore it after to prevent it being dropped.
    • Added tests to verify passthrough for object configs and formatter=false.

Written for commit 7ff8352. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Restoring the 'formatter' field at the end of the pipeline could overwrite legitimate modifications or additions made by intermediate handlers, violating the '100% no regressions' criteria.

@code-yeongyu code-yeongyu merged commit fb194fc into dev Feb 26, 2026
8 checks passed
@code-yeongyu code-yeongyu deleted the fix/issue-2117-preserve-formatter-config branch February 26, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Formatters defined in opencode don't work

1 participant