aboutsummaryrefslogtreecommitdiffstats
path: root/after/ftplugin/markdown.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
commit80f74b2f218ea622be2cdf791494b4d5f91bbd06 (patch)
treeb0758218bcc7d70cbdb51fbd8e9115f94f5693b6 /after/ftplugin/markdown.lua
parent19e20f1e23c5ba926a76957a1d20efcc83ff3fd2 (diff)
downloadnvim-config-80f74b2f218ea622be2cdf791494b4d5f91bbd06.tar.gz
nvim-config-80f74b2f218ea622be2cdf791494b4d5f91bbd06.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 'after/ftplugin/markdown.lua')
-rw-r--r--after/ftplugin/markdown.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua
index c7be170..c18397e 100644
--- a/after/ftplugin/markdown.lua
+++ b/after/ftplugin/markdown.lua
@@ -57,7 +57,7 @@ vim.opt_local.relativenumber = false
vim.opt_local.signcolumn = "auto"
vim.opt_local.foldcolumn = "0"
--
-vim.opt_local.textwidth = 120 -- gw wraps at this value
+vim.opt_local.textwidth = vim.g.dotfiles.textwidth.markdown -- gw wraps at this value
vim.opt_local.foldlevel = 1
-- Replace concealed text with a character from `'listchars'`
-- With `'foldmethod'` set to `expr` and `'foldlevel'` set to 2 fenced code blocks are concealed and completely invisible