Something old related to ltex and surround idek
This commit is contained in:
@@ -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 conform’s formatter so that gq uses Vim’s native formatter
|
||||
vim.bo.formatexpr = ""
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user