23 lines
442 B
Lua
23 lines
442 B
Lua
local overseer = require("overseer")
|
|
|
|
return {
|
|
name = "Compile typst",
|
|
builder = function()
|
|
local file = vim.fn.expand("%:p")
|
|
local cwd = vim.fn.getcwd()
|
|
|
|
return {
|
|
name = "Compile " .. vim.fn.bufname(),
|
|
cmd = { "typst" },
|
|
args = { "compile", file, "--root", cwd },
|
|
}
|
|
end,
|
|
tags = {overseer.TAG.BUILD},
|
|
condition = {
|
|
filetype = { "typst" },
|
|
callback = function()
|
|
return vim.fn.executable("typst") == 1
|
|
end,
|
|
},
|
|
}
|