From b95074d08921d5fc5d1c5003ea6811baa7c67055 Mon Sep 17 00:00:00 2001 From: Samuel O'Neal Date: Tue, 7 Jul 2026 15:09:26 -0600 Subject: [PATCH] added support to use overseer commands with odin projects --- lua/overseer/template/user/odin_build.lua | 20 ++++++++++++++++++++ lua/overseer/template/user/odin_run.lua | 20 ++++++++++++++++++++ lua/overseer/template/user/odin_test.lua | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 lua/overseer/template/user/odin_build.lua create mode 100644 lua/overseer/template/user/odin_run.lua create mode 100644 lua/overseer/template/user/odin_test.lua diff --git a/lua/overseer/template/user/odin_build.lua b/lua/overseer/template/user/odin_build.lua new file mode 100644 index 0000000..4ae9496 --- /dev/null +++ b/lua/overseer/template/user/odin_build.lua @@ -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, +} diff --git a/lua/overseer/template/user/odin_run.lua b/lua/overseer/template/user/odin_run.lua new file mode 100644 index 0000000..4a1b012 --- /dev/null +++ b/lua/overseer/template/user/odin_run.lua @@ -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, +} diff --git a/lua/overseer/template/user/odin_test.lua b/lua/overseer/template/user/odin_test.lua new file mode 100644 index 0000000..1b284cc --- /dev/null +++ b/lua/overseer/template/user/odin_test.lua @@ -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, +}