feat: python fixes

This commit is contained in:
2026-08-27 22:05:08 +02:00
parent f957a60c58
commit 4d38ef5b31
5 changed files with 34 additions and 18 deletions

View File

@@ -10,13 +10,14 @@ local config = {
typescriptreact = { "biome", "prettierd", "prettier", stop_after_first = true },
css = { "biome", "prettierd", "prettier", stop_after_first = true },
scss = { "biome", "prettierd", "prettier", stop_after_first = true },
-- python = function(bufnr)
-- if require("conform").get_formatter_info("ruff_format", bufnr).available then
-- return { "ruff_format" }
-- else
-- return { "isort", "black" }
-- end
-- end,
python = {
-- To fix auto-fixable lint errors.
"ruff_fix",
-- To run the Ruff formatter.
"ruff_format",
-- To organize the imports.
"ruff_organize_imports",
},
["_"] = { "trim_whitespace" }, -- run only on filetypes without formater
-- ["*"] = { "trim_whitespace" }, -- run in all filetypes
},
@@ -26,6 +27,9 @@ local config = {
},
-- Customize formatters
formatters = {
ruff = {
prepend_args = { "format" },
},
shfmt = {
prepend_args = { "-i", "2" },
},