feat: rename

This commit is contained in:
Barrett Ruth 2026-03-02 21:23:40 -05:00
parent e1d7abf58e
commit 942438f817
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
21 changed files with 660 additions and 305 deletions

40
lua/preview/presets.lua Normal file
View file

@ -0,0 +1,40 @@
local M = {}
---@type preview.ProviderConfig
M.typst = {
cmd = { 'typst', 'compile' },
args = function(ctx)
return { ctx.file }
end,
output = function(ctx)
return ctx.file:gsub('%.typ$', '.pdf')
end,
}
---@type preview.ProviderConfig
M.latex = {
cmd = { 'latexmk' },
args = function(ctx)
return { '-pdf', '-interaction=nonstopmode', ctx.file }
end,
output = function(ctx)
return ctx.file:gsub('%.tex$', '.pdf')
end,
clean = function(ctx)
return { 'latexmk', '-c', ctx.file }
end,
}
---@type preview.ProviderConfig
M.markdown = {
cmd = { 'pandoc' },
args = function(ctx)
local output = ctx.file:gsub('%.md$', '.pdf')
return { ctx.file, '-o', output }
end,
output = function(ctx)
return ctx.file:gsub('%.md$', '.pdf')
end,
}
return M