2023-10-04 19:12:59 +02:00
|
|
|
return {
|
2023-10-04 23:27:40 +02:00
|
|
|
-- improved refactoring
|
2023-10-04 19:12:59 +02:00
|
|
|
{
|
2024-03-05 19:46:26 +01:00
|
|
|
"stevearc/conform.nvim",
|
2024-03-05 14:44:15 +01:00
|
|
|
config = function()
|
|
|
|
require("conform").setup({
|
|
|
|
formatters_by_ft = {
|
2024-03-09 03:52:26 +01:00
|
|
|
lua = { "stylua" },
|
2024-03-05 14:44:15 +01:00
|
|
|
markdown = { "mdformat" },
|
2024-03-09 03:52:26 +01:00
|
|
|
python = { "isort", "yapf" },
|
|
|
|
sh = { "beautysh" },
|
|
|
|
shell = { "beautysh" },
|
2024-03-05 14:44:15 +01:00
|
|
|
tex = { "latexindent" },
|
2024-03-07 22:52:11 +01:00
|
|
|
yaml = { "yamlfmt" },
|
2024-03-05 19:46:26 +01:00
|
|
|
},
|
2024-03-05 14:44:15 +01:00
|
|
|
})
|
|
|
|
require("conform").formatters.latexindent = {
|
2024-03-06 17:14:39 +01:00
|
|
|
args = require("conform.util").extend_args(
|
|
|
|
require("conform.formatters.latexindent").args,
|
|
|
|
{ "-y=defaultIndent: ' '" }
|
|
|
|
),
|
2023-10-06 05:44:03 +02:00
|
|
|
}
|
2024-03-09 03:52:26 +01:00
|
|
|
require("conform").formatters.beautysh = {
|
|
|
|
args = require("conform.util").extend_args(
|
|
|
|
require("conform.formatters.beautysh").args,
|
|
|
|
{ "--indent-size=2", "--force-function-style=fnpar" }
|
|
|
|
),
|
|
|
|
}
|
2024-03-05 19:46:26 +01:00
|
|
|
end,
|
|
|
|
},
|
2023-10-04 19:12:59 +02:00
|
|
|
}
|