formatter name for uv mismatch between documentation and codebase #6798

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

Originally created by @paulclou on GitHub (Jan 19, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The uv formatter's internal name is uv format, mismatching the name shown in documentation as uv.

From docs/formatters
Image

But internal name is uv format instead

export const uvformat: Info = {
  name: "uv format",
  command: ["uv", "format", "--", "$FILE"],
  extensions: [".py", ".pyi"],

This results in configuration ignored inside opencode.jsonc

{
  "formatter": {
    "ruff": { "disabled": true },
    "uv": { "disabled": true }     // <-- ignored
  }
}

Plugins

No response

OpenCode version

No response

Steps to reproduce

# Install uv, then add "formatter" attribute into opencode.jsonc
grep \"formatter -A 3 ~/.config/opencode/opencode.jsonc
#  "formatter": {
#    "ruff": { "disabled": true },
#    "uv": { "disabled": true }
#  },

# create test file and execute opencode
echo "if True: print('42')" > test.py
opencode run 'add shebang for @test.py, then remove it'
cat test.py
# if True:
#     print("42")
# ^ standard formatting applied

# replace "uv" with "uv format", then re-create and re-run opencode
sed -i 's/uv/uv format/g' ~/.config/opencode/opencode.jsonc
echo "if True: print('42')" > test.py
opencode run 'add shebang for @test.py, then remove it'
cat test.py
# if True: print('42')
# ^ no formatting

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @paulclou on GitHub (Jan 19, 2026). Originally assigned to: @thdxr on GitHub. ### Description The uv formatter's internal name is `uv format`, mismatching the name shown in documentation as `uv`. From [docs/formatters](https://opencode.ai/docs/formatters/) <img width="967" height="29" alt="Image" src="https://github.com/user-attachments/assets/bbcdb5de-fdba-4b72-8856-84e289b76c7b" /> But [internal name](https://github.com/anomalyco/opencode/blob/23e9c02a7fd80063dd49e3b9cbd2a0c6519034bc/packages/opencode/src/format/formatter.ts#L229) is `uv format` instead ```typescript export const uvformat: Info = { name: "uv format", command: ["uv", "format", "--", "$FILE"], extensions: [".py", ".pyi"], ``` This results in configuration ignored inside `opencode.jsonc` ```jsonc { "formatter": { "ruff": { "disabled": true }, "uv": { "disabled": true } // <-- ignored } } ``` ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce ```bash # Install uv, then add "formatter" attribute into opencode.jsonc grep \"formatter -A 3 ~/.config/opencode/opencode.jsonc # "formatter": { # "ruff": { "disabled": true }, # "uv": { "disabled": true } # }, # create test file and execute opencode echo "if True: print('42')" > test.py opencode run 'add shebang for @test.py, then remove it' cat test.py # if True: # print("42") # ^ standard formatting applied # replace "uv" with "uv format", then re-create and re-run opencode sed -i 's/uv/uv format/g' ~/.config/opencode/opencode.jsonc echo "if True: print('42')" > test.py opencode run 'add shebang for @test.py, then remove it' cat test.py # if True: print('42') # ^ no formatting ``` ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugdocs labels 2026-02-16 18:05:18 -05:00
yindo closed this issue 2026-02-16 18:05:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6798