You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opencode ran my code through an auto-formatter? #1482
I was trying opencode. I asked Claude to make a small change to a C++ file. Before making the change, for some reason the entire file was auto-formatted. Notably, the project in question does not use auto-formatting, and the formatting rules applied do not resemble those from any project I've worked on. It seems like something just decided to pass the file to an arbitrary C++ auto-formatter with default settings? This ruined the change of course, as almost every line was modified to a style I don't use.
opencode should not be auto-formatting files when there is no auto-formatting config present.
Activity
thdxr commentedon Jul 31, 2025
our clang-format detection was bad - now only enabling if .clang-format is there
ElWazy commentedon Nov 24, 2025
Same issue with Python projects. Files are being auto-formatted despite explicitly disabling formatters in
opencode.json.I've tried disabling
uvandruffboth globally and per-project, but the formatting still occurs:{ "$schema": "https://opencode.ai/config.json", "formatter": { "uv": { "disabled": true }, "ruff": { "disabled": true }, "prettier": { "disabled": true } } }The configuration appears to be ignored completely.
rekram1-node commentedon Nov 24, 2025
@ElWazy where is your opencode.json located?
also if you hate formatting you can always do:
"formatter": falseinstead of doing each individual one
ElWazy commentedon Nov 25, 2025
Thanks @rekram1-node ! Setting
"formatter": falseworked perfectly.For context, I had
opencode.jsonin both locations:pyproject.toml)~/.config/opencode/opencode.jsonDisabling the formatter completely solved the issue. Appreciate the help!
feat(den): rename organization from Members page (anomalyco#1482)