mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim/ftplugin/sh: assume bash and use shfmt
This commit is contained in:
parent
19eeb416ef
commit
7d85c4befe
1 changed files with 5 additions and 0 deletions
5
.config/nvim/ftplugin/sh.lua
Normal file
5
.config/nvim/ftplugin/sh.lua
Normal 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" })
|
||||||
Loading…
Add table
Add a link
Reference in a new issue