summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/ftplugin/gitcommit.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-05-19 19:46:22 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-05-19 19:46:22 +0200
commitbe333763ae599d49b640a110d8f047c6c297e252 (patch)
tree27e68ce1edb5c9f5b745d7f513ffde49deab2a88 /.config/nvim/after/ftplugin/gitcommit.lua
parentb5dcfa4345287ae20edc52093c2546de39589ec8 (diff)
downloaddotfiles-be333763ae599d49b640a110d8f047c6c297e252.tar.gz
dotfiles-be333763ae599d49b640a110d8f047c6c297e252.zip
refactor(nvim): single source of truth for per-ft formatting width
- vim.g.dotfiles.textwidth = { sh=80, lua=120, markdown=120, gitcommit=72 } defined once in init.lua. - bash/lua/markdown/gitcommit ftplugins + render-markdown read from it; mdformat --wrap already follows vim.bo.textwidth. - gitcommit gets an explicit textwidth line (was implicit runtime 72). - Behavior unchanged; one number now propagates everywhere.
Diffstat (limited to '.config/nvim/after/ftplugin/gitcommit.lua')
-rw-r--r--.config/nvim/after/ftplugin/gitcommit.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/gitcommit.lua b/.config/nvim/after/ftplugin/gitcommit.lua
index fea0559..26cac51 100644
--- a/.config/nvim/after/ftplugin/gitcommit.lua
+++ b/.config/nvim/after/ftplugin/gitcommit.lua
@@ -1,3 +1,4 @@
+vim.opt_local.textwidth = vim.g.dotfiles.textwidth.gitcommit -- gw wraps at this value
vim.opt_local.colorcolumn = "+1" -- Highlight one column after 'textwidth'
vim.opt_local.tabstop = 2 -- CommonMark expects two spaces for indentation
vim.opt_local.shiftwidth = 0