Files
nvim/lua/overseer/template/user/templ_gen.lua
T

20 lines
497 B
Lua
Raw Normal View History

-- /home/stevearc/.config/nvim/lua/overseer/template/user/run_script.lua
return {
name = "run script",
builder = function()
local file = vim.fn.expand "%:p"
local cmd = { file }
if vim.bo.filetype == "templ" then cmd = { "templ", "generate" } end
return {
cmd = cmd,
components = {
{ "on_output_quickfix", set_diagnostics = true },
"on_result_diagnostics",
"default",
},
}
end,
condition = {
filetype = { "templ" },
},
}