require("custom.runner").setup({
	commands = {
		run = function()
			local command = require("custom.runner").command
			command:add("odin run ./src/")
			command.target = { position = "bottom" }
			command:run()
		end,
		build_debug = function()
			local command = require("custom.runner").command

			command:add("odin build ./src/ -debug -out:build/debug")

			command.target = { position = "bottom" }
			command:run()
		end,
		debug = function()
			local command = require("custom.runner").command
			local current_file = vim.api.nvim_buf_get_name(0)

			command:add("odin build ./src/ -debug -out:build/debug")

			if current_file ~= "" then
				command:add(string.format("raddbg ./build/debug --open %q", current_file))
			else
				command:add("raddbg ./build/debug")
			end
			command.target = { position = "bottom" }
			command:run()
		end,
	},

	exclude = {
		"build",
		"Tiled",
		"assets",
		".gdbf",
		".gdbinit",
	},
})
