Open exhuma opened 1 year ago
Is vim in the project directory when you run the formatter; is the output of :pwd<CR>
the project directory
Actually, this looks similar to #218
I can confirm that :pwd
shows the correct path. That is, the root of the project which contains the isort
config.
Ok it's because the stdin
option copies everything to a temp file first, so isort things the project directory is the temp dir or something.
If you change the line about requiring isort,
require("formatter.filetypes.python").isort,
to
function()
local util = require("formatter.util")
return {
exe = "isort",
args = {
"--quiet",
"--",
util.escape_path(util.get_current_buffer_file_path())
},
stdin = false
}
end,
that should fix it
Unfortunately this still ignores the config :(
Which configuration? Type (custom or builtin): builtin Filetype: python Formatter: isort
Configuration(s) (post all the variants you tried):
Expected behavior
The formatter should run
isort
with the project configuration (this is the defaultisort
behaviour)Actual behaviour
Runs
isort
with the default config even if a configuration file exists in the project root.Additional context /