1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 02:17:44 +01:00

32 lines
888 B
Lua
Raw Normal View History

return {
-- improved refactoring
{
2024-03-05 19:46:26 +01:00
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
2024-03-09 03:52:26 +01:00
lua = { "stylua" },
markdown = { "mdformat" },
2024-03-09 03:52:26 +01:00
python = { "isort", "yapf" },
sh = { "beautysh" },
shell = { "beautysh" },
tex = { "latexindent" },
yaml = { "yamlfmt" },
2024-03-05 19:46:26 +01:00
},
})
require("conform").formatters.latexindent = {
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,
},
}