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. --- plugin/50-markdown.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/50-markdown.lua b/plugin/50-markdown.lua index 9642617..87a7838 100644 --- a/plugin/50-markdown.lua +++ b/plugin/50-markdown.lua @@ -17,7 +17,7 @@ require("nvim-treesitter").install({ "yaml", }) -local markdown_textwidth = 120 +local markdown_textwidth = vim.g.dotfiles.textwidth.markdown require("render-markdown").setup({ heading = { width = "block", min_width = markdown_textwidth }, code = { position = "center", sign = false, width = "block", min_width = markdown_textwidth / 2, left_margin = 2 }, -- cgit v1.3.1