Auto commit: 2024-11-08 00:10:01
This commit is contained in:
parent
5446ebfdc5
commit
6c28b653f9
1 changed files with 14 additions and 0 deletions
|
@ -23,6 +23,20 @@ local md_tex = function()
|
||||||
vim.cmd("syntax region texMathZone start=/\\$/ skip=/\\\\\\$/ end=/\\$/ concealends contained")
|
vim.cmd("syntax region texMathZone start=/\\$/ skip=/\\\\\\$/ end=/\\$/ concealends contained")
|
||||||
vim.cmd("syntax region texMathDisplay start=/\\$\\$/ end=/\\$\\$/ concealends contained")
|
vim.cmd("syntax region texMathDisplay start=/\\$\\$/ end=/\\$\\$/ concealends contained")
|
||||||
end
|
end
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "markdown",
|
||||||
|
callback = function()
|
||||||
|
-- Define syntax regions for inline math
|
||||||
|
vim.cmd([[syntax match markdownMathInline '\\$[^$].\{-}\$']])
|
||||||
|
vim.cmd([[syntax region markdownMathBlock start=/\\$\\$/ end=/\\$\\$/]])
|
||||||
|
|
||||||
|
-- Set both inline and block math to 'tex' filetype
|
||||||
|
vim.cmd([[
|
||||||
|
syntax match tex '\\$[^$].\{-}\$'
|
||||||
|
syntax region tex start=/\\$\\$/ end=/\\$\\$/
|
||||||
|
]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
pattern = { "markdown" },
|
pattern = { "markdown" },
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue