1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-13 04:51:15 +02:00

nvim: added shell formatter

This commit is contained in:
2024-03-09 03:52:26 +01:00
parent 3ce32917a1
commit 34c63dd99f
3 changed files with 43 additions and 30 deletions

View File

@@ -5,10 +5,12 @@ return {
config = function()
require("conform").setup({
formatters_by_ft = {
python = { "isort", "yapf" },
markdown = { "mdformat" },
tex = { "latexindent" },
lua = { "stylua" },
markdown = { "mdformat" },
python = { "isort", "yapf" },
sh = { "beautysh" },
shell = { "beautysh" },
tex = { "latexindent" },
yaml = { "yamlfmt" },
},
})
@@ -18,6 +20,12 @@ return {
{ "-y=defaultIndent: ' '" }
),
}
require("conform").formatters.beautysh = {
args = require("conform.util").extend_args(
require("conform.formatters.beautysh").args,
{ "--indent-size=2", "--force-function-style=fnpar" }
),
}
end,
},
}