27 lines
516 B
Lua
27 lines
516 B
Lua
|
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,
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
})
|