AutoYADM commit: 2024-12-21 01:45:02

This commit is contained in:
Daniel Fichtinger 2024-12-21 01:45:02 -05:00
parent d2b15874ce
commit a26414ed44
2 changed files with 4 additions and 3 deletions

View file

@ -17,8 +17,9 @@ vim.api.nvim_create_autocmd("VimEnter", {
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown", pattern = "markdown",
callback = function() callback = function()
vim.opt_local.breakindent = true if vim.g.md_tex then
vim.cmd([[ vim.opt_local.breakindent = true
vim.cmd([[
syn region mathBlock start=/\$\$/ end=/\$\$/ contains=@tex syn region mathBlock start=/\$\$/ end=/\$\$/ contains=@tex
" inline math " inline math
syn match mathInline '\$[^$].\{-}\$' contains=@tex syn match mathInline '\$[^$].\{-}\$' contains=@tex
@ -27,6 +28,7 @@ vim.api.nvim_create_autocmd("FileType", {
hi def link mathBlock Statement hi def link mathBlock Statement
hi def link mathInline Statement hi def link mathInline Statement
]]) ]])
end
end, end,
}) })

View file

@ -27,7 +27,6 @@ return {
}, },
ft = { "markdown", "rmd", "vimwiki" }, ft = { "markdown", "rmd", "vimwiki" },
config = function(_, opts) config = function(_, opts)
vim.g.md_tex = true
require("render-markdown").setup(opts) require("render-markdown").setup(opts)
Snacks.toggle({ Snacks.toggle({
name = "Render Markdown", name = "Render Markdown",