Overseer
This commit is contained in:
parent
a91efd762c
commit
c55ae33c51
4 changed files with 42 additions and 1 deletions
22
lua/overseer/template/user/run_script.lua
Normal file
22
lua/overseer/template/user/run_script.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- /home/stevearc/.config/nvim/lua/overseer/template/user/run_script.lua
|
||||
return {
|
||||
name = "run script",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
local cmd = { file }
|
||||
if vim.bo.filetype == "go" then
|
||||
cmd = { "go", "run", file }
|
||||
end
|
||||
return {
|
||||
cmd = cmd,
|
||||
components = {
|
||||
{ "on_output_quickfix", set_diagnostics = true },
|
||||
"on_result_diagnostics",
|
||||
"default",
|
||||
},
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = { "sh", "python", "go" },
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue