nvim/ftplugin/sh: assume bash and use shfmt

This commit is contained in:
Primrose 2025-07-14 14:08:29 +02:00
parent 19eeb416ef
commit 7d85c4befe
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -0,0 +1,5 @@
vim.keymap.set("n", "<leader>f", function()
local saved = vim.fn.winsaveview()
vim.cmd([[silent exec "%!shfmt"]])
vim.fn.winrestview(saved)
end, { desc = "ft(sh): Format with shfmt" })