mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-10 19:41:15 +02:00
nvim: added shell formatter
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ return {
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
-- latex
|
||||
require("null-ls").builtins.formatting.latexindent,
|
||||
-- require("null-ls").builtins.formatting.latexindent,
|
||||
-- lua
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
-- markdown
|
||||
@@ -17,6 +17,8 @@ return {
|
||||
-- python
|
||||
require("null-ls").builtins.formatting.isort,
|
||||
require("null-ls").builtins.formatting.yapf,
|
||||
-- shell
|
||||
-- require("null-ls").builtins.formatting.beautysh,
|
||||
-- yaml
|
||||
require("null-ls").builtins.formatting.yamlfmt,
|
||||
}
|
||||
@@ -37,6 +39,8 @@ return {
|
||||
-- python
|
||||
"isort",
|
||||
"yapf",
|
||||
-- shell
|
||||
"beautysh",
|
||||
-- yaml
|
||||
"yamlfmt",
|
||||
}
|
||||
|
Reference in New Issue
Block a user