feat(neovim): install pandoc

This commit is contained in:
Barrett Ruth 2026-03-01 17:38:08 -05:00
parent 339840a602
commit bfa0f77296
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 47 additions and 1 deletions

View file

@ -409,7 +409,7 @@ return {
},
{
'barrettruth/render.nvim',
ft = { 'typst', 'tex' },
ft = { 'typst', 'tex', 'markdown' },
before = function()
vim.g.render = {
providers = {
@ -432,10 +432,24 @@ return {
end,
clean = { 'latexmk', '-c' },
},
pandoc = {
cmd = { 'pandoc' },
args = function(ctx)
local output = ctx.file:gsub('%.md$', '.html')
return { ctx.file, '-s', '--embed-resources', '-o', output }
end,
output = function(ctx)
return ctx.file:gsub('%.md$', '.html')
end,
clean = function(ctx)
return { 'rm', '-f', ctx.file:gsub('%.md$', '.html') }
end,
},
},
providers_by_ft = {
typst = 'typst',
tex = 'latexmk',
markdown = 'pandoc',
},
}
end,