From 9236e1f700b028da61302be8371401fe0fd86f0c Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Fri, 12 Jun 2026 11:51:23 +0200 Subject: misc(nvim): wrap text only visually in markdown buffers --- .config/nvim/after/ftplugin/markdown.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua index f0f9691..972e9b1 100644 --- a/.config/nvim/after/ftplugin/markdown.lua +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -7,8 +7,9 @@ vim.opt_local.number = false vim.opt_local.relativenumber = false vim.opt_local.signcolumn = "auto" vim.opt_local.foldcolumn = "0" --- -vim.opt_local.textwidth = vim.g.dotfiles.textwidth.markdown -- gw wraps at this value + +vim.opt_local.textwidth = 0 -- No automatic text wrapping (use Semantic Lines Breaks instead! https://sembr.org/) +vim.opt_local.wrap = true -- There is a bug where folded fenced code blocks will be completely invisible -- But (apparently) it only happen when there is a # heading (and no ## heading, no ### heading etc) -- Probably caused by tree-sitter parsing, but it's not really a problem, since adding a ## heading fixes it -- cgit v1.3.1