mirror of https://github.com/ray-x/go.nvim
feature: run gotestsum watch in background
parent
25e967fdff
commit
b7f07ab887
@ -0,0 +1,23 @@
|
||||
local runner = require("go.runner")
|
||||
local utils = require("go.utils")
|
||||
local M = {}
|
||||
|
||||
function M.watch(args)
|
||||
args = args or {}
|
||||
|
||||
local cmd = { "gotestsum", "--watch" }
|
||||
vim.list_extend(cmd, args)
|
||||
|
||||
local opts = {
|
||||
update_buffer = true,
|
||||
on_exit = function()
|
||||
vim.schedule(function()
|
||||
utils.restart()
|
||||
end)
|
||||
end,
|
||||
}
|
||||
runner.run(cmd, opts)
|
||||
return cmd, opts
|
||||
end
|
||||
|
||||
return M
|
Loading…
Reference in New Issue