1
0
mirror of https://codeberg.org/diginaut/dotfiles.git synced 2026-02-04 04:30:27 +01:00

Other bash/shell linter

This commit is contained in:
2026-01-23 18:52:34 +01:00
parent d8740ddd85
commit cf93d46371

View File

@@ -0,0 +1,30 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
sh = { "shfmt" },
bash = { "shfmt" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- quiet = true,
-- },
},
config = function(_, opts)
local conform = require("conform")
conform.setup(opts)
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
vim.keymap.set("n", "<leader>f", function()
conform.format({
timeout_ms = 5000,
lsp_fallback = true,
})
end)
end,
}