Add overseer cargo jobs

This commit is contained in:
Andreas Tsouchlos 2024-06-06 00:59:14 +02:00
parent dafec71c57
commit bbb673e7e2
5 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,25 @@
return {
name = "Cargo Build",
builder = function()
local file = vim.fn.expand("%:p")
return {
cmd = {
"cargo"
},
args = {
"build"
},
components = {
{
"on_output_quickfix"
},
"default"
}
}
end,
condition = {
filetype = {
"rust",
}
}
}

View File

@ -0,0 +1,22 @@
return {
name = "Cargo Clean",
builder = function()
local file = vim.fn.expand("%:p")
return {
cmd = {
"cargo"
},
args = {
"clean",
},
components = {
"default"
}
}
end,
condition = {
filetype = {
"rust",
}
}
}

View File

@ -0,0 +1,22 @@
return {
name = "Cargo Run",
builder = function()
local file = vim.fn.expand("%:p")
return {
cmd = {
"cargo"
},
args = {
"run"
},
components = {
"default"
}
}
end,
condition = {
filetype = {
"rust"
}
}
}

View File

@ -0,0 +1,24 @@
return {
name = "Cargog Test",
builder = function()
return {
cmd = {
"cargo"
},
args = {
"test",
},
components = {
{
"on_output_quickfix"
},
"default"
}
}
end,
condition = {
filetype = {
"rust",
}
}
}

View File

@ -3,7 +3,11 @@ return {
config = function() config = function()
require("overseer").setup({ require("overseer").setup({
templates = { templates = {
"builtin", -- "builtin",
"user.cargo_build",
"user.cargo_clean",
"user.cargo_run",
"user.cargo_test",
"user.cmake_generate", "user.cmake_generate",
"user.cmake_build", "user.cmake_build",
"user.cmake_clean", "user.cmake_clean",