feat(overseer): Add templates for compiling and watching typst files

This commit is contained in:
kalmenn 2024-09-19 23:21:34 +02:00
parent 3ae9e70c4d
commit ec74c2d18f
Signed by: kalmenn
GPG key ID: F500055C44BC3834
3 changed files with 66 additions and 10 deletions

View file

@ -0,0 +1,22 @@
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,
},
}