Skip to content

bug: Formatter 'oxfmt' error: Error: --stdin-filepath is not expected in this context #865

Closed

Description

@chyuv

Neovim version (nvim -v)

NVIM v0.12.0-dev-825+gd4c8e8df1c

Operating system/version

debian12

Read debugging tips

Add the debug logs

  • I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.

Log file

2026-03-31 20:41:13[DEBUG] Running formatters on /home/linux/.config/nvim/test.json: { "oxfmt" }
2026-03-31 20:41:13[INFO] Run oxfmt on /home/linux/.config/nvim/test.json
2026-03-31 20:41:13[DEBUG] Run command: { "/home/linux/anydev/app/x86_64/bin/oxfmt", "--stdin-filepath", "/home/linux/.config/nvim/test.json" }
2026-03-31 20:41:13[DEBUG] Run default CWD: /home/linux/.config/nvim
2026-03-31 20:41:13[INFO] oxfmt exited with code 1
2026-03-31 20:41:13[DEBUG] oxfmt stdout: { "" }
2026-03-31 20:41:13[DEBUG] oxfmt stderr: { "Error: --stdin-filepath is not expected in this context", "" }
2026-03-31 20:41:13[ERROR] Formatter 'oxfmt' error: Error: --stdin-filepath is not expected in this context

Describe the bug

Hi, I got this error with oxfmt, on formatting json file.

My config:

require("conform").setup({
  log_level = vim.log.levels.DEBUG,
  formatters_by_ft = {
    json = { "oxfmt" },
  },
})

conform version: master
oxfmt version: 0.43.0

What is the severity of this bug?

tolerable (can work around it)

Steps To Reproduce

  1. Install oxfmt 0.43.0, the latest
  2. format a json file.

Expected Behavior

Not failed

Minimal example file

No response

Minimal init.lua

require("conform").setup({
  log_level = vim.log.levels.DEBUG,
  formatters_by_ft = {
    json = { "oxfmt" },
  },
})

Additional context

No response

Activity

  1. ParzivalVulpine commented on Apr 17, 2026

    @ParzivalVulpine

    I got this error message as well while using LazyVim, after enabling the oxc extras for typescript.

  2. krypciak commented on Jul 23, 2026

    @krypciak

    I fixed this by adding this to my config:

    formatters = {
        oxfmt = {
            stdin = false,
            args = { '$FILENAME' },
        },
    }
  3. chyuv commented on Aug 28, 2026

    @chyuv
    Author

    I fixed this by adding this to my config:

    formatters = {
    oxfmt = {
    stdin = false,
    args = { '$FILENAME' },
    },
    }

    @krypciak It works! Thank you krypciak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions