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'm using conform on python scripts using isort. After some updates, aka getting isort>=5.13, conform fails because --filename is no longer an option to isort.
Reverting to isort<5.13 fixes the error.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
Have conform.nvim setup in your nvim.
Have conform use isort for python files.
install isort<=5.13
try to run conform on a python script
then do :ConformIno to see the error
Expected Behavior
I'm expecting to auto format my python scripts using conform and isort.
Minimal example file
No response
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,
opts= {
-- Define your formattersformatters_by_ft= {
python= { "isort", "black", "ruff" },
-- Use the "_" filetype to run formatters on filetypes that don't-- have other formatters configured.
["_"] = { "trim_whitespace" },
},
},
-- 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:
Version 5.13 is from 2023. --filename is included in the official documentation. I'm not sure why it was working before version 5.13, but perhaps it was less strict about args checking? In any case, it would appear that the latest version does accept this argument. If you want to support older versions, you'll need to manually adjust the formatter args.
Neovim version (nvim -v)
NVIM v0.11.0 Build type: Release LuaJIT 2.1.1741730670 Run "nvim -V1 -v" for more info
Operating system/version
Linux XXX 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Read debugging tips
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Log file: $HOME/.local/state/nvim/conform.log │
│ [--sg SKIP_GLOB] [--gitignore] [--sl] │
│ [--nsl SINGLE_LINE_EXCLUSIONS] [--sp SETTINGS_PATH] │
│ [-t FORCE_TO_TOP] [--tc] [--up] [-V] [-v] │
│ [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV] [--vn] │
│ [-l LINE_LENGTH] [--wl WRAP_LENGTH] [--ws] [--case-sensitive] │
│ [--filter-files] [--py {all,2,27,3,35,36,37,38,39,auto}] │
│ [--profile PROFILE] [--interactive] [--old-finders] │
│ [--show-config] [--show-files] [--honor-noqa] │
│ [--remove-redundant-aliases] [--color] [--float-to-top] │
│ [--treat-comment-as-code TREAT_COMMENTS_AS_CODE] │
│ [--treat-all-comment-as-code] [--formatter FORMATTER] │
│ [--ext SUPPORTED_EXTENSIONS] │
│ [--blocked-extension BLOCKED_EXTENSIONS] [--dedup-headings] │
│ [--only-sections] [--only-modified] │
│ [files [files ...]] │
│ isort: error: unrecognized arguments: --filename │
│ │
│Formatters for this buffer: │
│LSP: ruff │
│isort ready (python) $HOME/.conda/envs/common-voice-bundler/bin/isort │
│black ready (python) $HOME/.conda/envs/common-voice-bundler/bin/black │
│ruff ready (python) $HOME/.local/share/nvim/mason/bin/ruff
Describe the bug
I'm using
conform
on python scripts usingisort
. After some updates, aka gettingisort>=5.13
,conform
fails because--filename
is no longer an option toisort
.Reverting to
isort<5.13
fixes the error.What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
Have
conform.nvim
setup in yournvim
.Have
conform
useisort
for python files.install
isort<=5.13
try to run
conform
on a python scriptthen do
:ConformIno
to see the errorExpected Behavior
I'm expecting to auto format my python scripts using
conform
andisort
.Minimal example file
No response
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: