Public Access
added mdmath for latex image display.
This commit is contained in:
+15
-1
@@ -27,6 +27,7 @@ vim.pack.add({
|
|||||||
{ src = "https://github.com/rcarriga/nvim-dap-ui" },
|
{ src = "https://github.com/rcarriga/nvim-dap-ui" },
|
||||||
{ src = "https://github.com/michaelrommel/nvim-silicon" },
|
{ src = "https://github.com/michaelrommel/nvim-silicon" },
|
||||||
{ src = "https://github.com/hat0uma/csvview.nvim.git" },
|
{ src = "https://github.com/hat0uma/csvview.nvim.git" },
|
||||||
|
{ src = "https://github.com/Thiago4532/mdmath.nvim" },
|
||||||
})
|
})
|
||||||
|
|
||||||
pcall(vim.cmd.colorscheme, "gruvbox")
|
pcall(vim.cmd.colorscheme, "gruvbox")
|
||||||
@@ -65,10 +66,23 @@ require("conform").setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
require("render-markdown").setup({
|
require("render-markdown").setup({
|
||||||
latex = { enabled = true },
|
latex = { enabled = false }, -- mdmath.nvim renders math as images
|
||||||
code = { inline_pad = 0, highlight_inline = "RenderMarkdownCode" },
|
code = { inline_pad = 0, highlight_inline = "RenderMarkdownCode" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("mdmath").setup({
|
||||||
|
dynamic_scale = 0.5,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Rebuild mdmath JS deps on plugin update
|
||||||
|
vim.api.nvim_create_autocmd("PackChanged", {
|
||||||
|
callback = function(ev)
|
||||||
|
if ev.data.spec.name == "mdmath.nvim" and ev.data.kind == "update" then
|
||||||
|
vim.system({ "npm", "install" }, { cwd = ev.data.path .. "/mdmath-js" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "markdown",
|
pattern = "markdown",
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
|
|||||||
Reference in New Issue
Block a user