From 70986c5e0aadf9275dc07e1b39d5f040c8af37a4 Mon Sep 17 00:00:00 2001 From: bh Date: Fri, 6 Mar 2026 21:27:08 +0800 Subject: Fixed LaTeX issues --- lua/config/vimtex.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lua/config') diff --git a/lua/config/vimtex.lua b/lua/config/vimtex.lua index 24679bf..4a1de11 100644 --- a/lua/config/vimtex.lua +++ b/lua/config/vimtex.lua @@ -16,6 +16,15 @@ return function() }, } + -- Auto hard-wrap at 80 columns for .tex files + vim.api.nvim_create_autocmd("FileType", { + pattern = "tex", + callback = function() + vim.opt_local.textwidth = 80 + vim.opt_local.formatoptions:append("t") + end, + }) + -- Optional: disable conceal for clearer LaTeX text vim.g.vimtex_syntax_conceal = { accents = 0, -- cgit v1.2.3