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
I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.
Log file
Log file: D:\Work\ruff_format_bug\.repro\\state\nvim-data\conform.log
14:38:23[DEBUG] Run command: { "ruff", "--line-length", "80", "format", "--force-exclude", "--stdin-filename", "D:/Work/ruff_format_bug/main.py", "-" }
14:38:23[DEBUG] Run default CWD: D:\Work\ruff_format_bug
14:38:23[INFO] ruff_format exited with code 1
14:38:23[DEBUG] ruff_format stdout: { "main.py:1:5: E999 SyntaxError: Simple statements must be separated by newlines or semicolons", "Found 1 error.", "" }
14:38:23[DEBUG] ruff_format stderr: { "warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.", "warning: Ignoring file format in favor of standard input.", "error: Failed to parse main.py:1:5: Simple statements must be separated by newlines or semicolons", "" }
14:38:23[ERROR] Formatter 'ruff_format' error: warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.
warning: Ignoring file format in favor of standard input.
error: Failed to parse main.py:1:5: Simple statements must be separated by newlines or semicolons
Formatters for this buffer:
ruff_format ready (python) D:\Work\ruff_format_bug\.repro\\data\nvim-data\mason\bin\ruff.CMD
Describe the bug
When specifying the prepend_args property, the final arguments of ruff format are added before format command.
Neovim version (nvim -v)
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068
Operating system/version
Windows 10 Pro N
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Describe the bug
When specifying the
prepend_args
property, the final arguments ofruff format
are added beforeformat
command.Should be:
Or:
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
ruff format
argument sequence is incorrectExpected Behavior
Successful format using
ruff format
Minimal example file
Any clean/dirty Python file.
Minimal init.lua
Additional context
The issue can be bypassed by overriding the arguments by putting custom arguments anywhere after
format
:Alternatively, a new property
append_args
can be added toconform.FormatterConfigOverride
:And in
merge_formatter_configs
as the functionality is already there:The text was updated successfully, but these errors were encountered: