Something old related to ltex and surround idek

This commit is contained in:
c-salomonsen
2025-09-13 02:09:53 +02:00
parent 1a6e75cace
commit f42322984e

View File

@@ -33,18 +33,6 @@ vim.api.nvim_create_autocmd("textyankpost", {
-- Surround
vim.api.nvim_create_autocmd("QuickFixCmdPost", {
callback = function()
local qf = vim.fn.getqflist({ size = 0 })
if qf.size > 0 then
vim.cmd("copen")
end
end,
pattern = "*",
})
-- Surround
vim.api.nvim_create_autocmd("FileType", {
pattern = "tex",
callback = function()
@@ -53,3 +41,16 @@ vim.api.nvim_create_autocmd("FileType", {
vim.b.surround_102 = "\\textbf{" .. "\n" .. "}"
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "tex",
callback = function()
-- Set a maximum line width of 88 characters
vim.bo.textwidth = 88
-- Ensure 'formatoptions' includes the 't' flag for text wrapping
vim.bo.formatoptions = vim.bo.formatoptions .. "t"
-- Disable conforms formatter so that gq uses Vims native formatter
vim.bo.formatexpr = ""
end,
})