dotfiles/dot_config/nvim/after/ftplugin/tex.lua

27 lines
516 B
Lua
Raw Normal View History

2023-02-24 11:03:09 +01:00
vim.g.tex_flavor = "latex"
vim.opt_local.conceallevel = 2
-- vim.opt_local.spell = true
vim.opt_local.wrap = true
require("nvim-surround").buffer_setup({
surrounds = {
['"'] = {
add = { "``", "''" },
find = "``.-''",
delete = "^(``)().-('')()$",
},
["$"] = {
add = { "\\(", "\\)" },
find = "\\%(.-\\%)",
delete = "^(\\%()().-(\\%))()$",
change = {
target = "^\\(%()().-(\\%))()$",
replacement = function()
return { { "[", "\t" }, { "", "\\]" } }
end,
},
},
},
})