summaryrefslogtreecommitdiffstats
path: root/after/ftplugin/bash.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-11 19:53:59 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-11 20:08:37 +0200
commit94087c1bda9dc3f64710174c3e1da264a821d438 (patch)
tree1bf484139b0aa0ad53afcaadb7e77465cbb6d0f3 /after/ftplugin/bash.lua
parentf8c324b806a1b69d79633ea8bc4cf851b8c9bbeb (diff)
downloadnvim-config-94087c1bda9dc3f64710174c3e1da264a821d438.tar.gz
nvim-config-94087c1bda9dc3f64710174c3e1da264a821d438.zip
refactor(nvim): rewrite the buffer formatting flow
Diffstat (limited to 'after/ftplugin/bash.lua')
-rw-r--r--after/ftplugin/bash.lua17
1 files changed, 0 insertions, 17 deletions
diff --git a/after/ftplugin/bash.lua b/after/ftplugin/bash.lua
deleted file mode 100644
index 6e10433..0000000
--- a/after/ftplugin/bash.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-vim.opt_local.textwidth = vim.g.dotfiles.textwidth.sh -- gw wraps at this value
-vim.opt_local.colorcolumn = "+1" -- Highlight one column after 'textwidth'
-vim.opt_local.complete = {
- "o", -- 'omnifunc'
-}
-
-vim.b.autoformat = true
-vim.b.format_func = function()
- local ret = vim.system({ "shfmt" }, { stdin = vim.api.nvim_buf_get_lines(0, 0, -1, false) }):wait()
- if ret.code ~= 0 then
- vim.notify("shfmt failed (" .. ret.code .. "):\n" .. ret.stderr, vim.log.levels.WARN)
- return
- end
- local view = vim.fn.winsaveview()
- vim.cmd("%!shfmt")
- vim.fn.winrestview(view)
-end