feat(neovim): install pandoc
This commit is contained in:
parent
339840a602
commit
bfa0f77296
3 changed files with 47 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue