Add overseer cargo jobs
This commit is contained in:
parent
dafec71c57
commit
bbb673e7e2
25
nvim/.config/nvim/lua/overseer/template/user/cargo_build.lua
Normal file
25
nvim/.config/nvim/lua/overseer/template/user/cargo_build.lua
Normal 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",
|
||||
}
|
||||
}
|
||||
}
|
||||
22
nvim/.config/nvim/lua/overseer/template/user/cargo_clean.lua
Normal file
22
nvim/.config/nvim/lua/overseer/template/user/cargo_clean.lua
Normal 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",
|
||||
}
|
||||
}
|
||||
}
|
||||
22
nvim/.config/nvim/lua/overseer/template/user/cargo_run.lua
Normal file
22
nvim/.config/nvim/lua/overseer/template/user/cargo_run.lua
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
24
nvim/.config/nvim/lua/overseer/template/user/cargo_test.lua
Normal file
24
nvim/.config/nvim/lua/overseer/template/user/cargo_test.lua
Normal 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",
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,11 @@ return {
|
||||
config = function()
|
||||
require("overseer").setup({
|
||||
templates = {
|
||||
"builtin",
|
||||
-- "builtin",
|
||||
"user.cargo_build",
|
||||
"user.cargo_clean",
|
||||
"user.cargo_run",
|
||||
"user.cargo_test",
|
||||
"user.cmake_generate",
|
||||
"user.cmake_build",
|
||||
"user.cmake_clean",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user