From 80f74b2f218ea622be2cdf791494b4d5f91bbd06 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 19 May 2026 19:46:22 +0200 Subject: 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. --- after/ftplugin/gitcommit.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'after/ftplugin/gitcommit.lua') diff --git a/after/ftplugin/gitcommit.lua b/after/ftplugin/gitcommit.lua index fea0559..26cac51 100644 --- a/after/ftplugin/gitcommit.lua +++ b/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 -- cgit v1.3.1