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
2025-03-03 15:52:52[INFO] Run ruff on /Users/acaibird/Documents/python/Fastapi/main.py
2025-03-03 15:52:52[DEBUG] Run command: { "/opt/homebrew/bin/ruff", "check", "--fix", "--force-exclude", "--exit-zero", "--no-cache", "--stdin-filename", "/Users/acaibird/Documents/python/Fastapi/main.py", "-" }
2025-03-03 15:52:52[DEBUG] Run default CWD: /Users/acaibird/Documents/python/Fastapi
2025-03-03 15:52:52[DEBUG] ruff exited with code 0
Describe the bug
can not use ruff to format python file, but black ok. I think it's the wrong command to call ruff to format, in ruff 0.9.7 it should be ruff format, but I didn't find it
What is the severity of this bug?
minor (annoyance)
Steps To Reproduce
using ruff v0.9.7
modify python file, and save it
Expected Behavior
get formated code,
Minimal example file
require("conform").setup({
formatters_by_ft= {
lua= { "stylua" },
-- Conform will run multiple formatters sequentiallypython= { "ruff" },
-- You can customize some of the format options for the filetype (:help conform.format)rust= { "rustfmt", lsp_format="fallback" },
-- Conform will run the first available formatterjavascript= { "biome", "prettierd", "prettier", stop_after_first=true },
css= { "biome", "prettier" },
scss= { "biome", "prettier" },
go= { "gofmt", "golines" },
json= { "biome", "prettier" },
},
format_on_save= {
-- These options will be passed to conform.format()timeout_ms=500,
lsp_format="fallback",
},
log_level=vim.log.levels.DEBUG,
})
Minimal init.lua
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
{
"stevearc/conform.nvim",
config=function()
require("conform").setup({
log_level=vim.log.levels.DEBUG,
-- add your config here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Additional context
No response
The text was updated successfully, but these errors were encountered:
There are two formatters for ruff: ruff_fix which runs ruff check --fix and ruff_format which runs ruff format. The bare ruff formatter is deprecated and aliases to ruff_fix.
Neovim version (nvim -v)
nvim v0.10.4
Operating system/version
MacOS 15.1
Read debugging tips
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Describe the bug
can not use ruff to format python file, but black ok. I think it's the wrong command to call ruff to format, in ruff 0.9.7 it should be
ruff format
, but I didn't find itWhat is the severity of this bug?
minor (annoyance)
Steps To Reproduce
Expected Behavior
get formated code,
Minimal example file
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: