added support to use overseer commands with odin projects #4
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
name = "odin: build",
|
||||||
|
desc = "Build the Odin project (odin build .)",
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.glob("*.odin") ~= "" or vim.fn.expand("%:e") == "odin"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "odin" },
|
||||||
|
args = { "build", "." },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
name = "odin: run",
|
||||||
|
desc = "Build and run (odin run .)",
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.glob("*.odin") ~= "" or vim.fn.expand("%:e") == "odin"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "odin" },
|
||||||
|
args = { "run", "." },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
name = "odin: test",
|
||||||
|
desc = "Run the tests (odin test .)",
|
||||||
|
condition = {
|
||||||
|
callback = function()
|
||||||
|
return vim.fn.glob("*.odin") ~= "" or vim.fn.expand("%:e") == "odin"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "odin" },
|
||||||
|
args = { "test", "." },
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
"on_output_quickfix",
|
||||||
|
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user