refactor: migrate to vim.notify from prints
This commit is contained in:
parent
b4fd34ec17
commit
0b415c32e8
8 changed files with 40 additions and 22 deletions
|
|
@ -1,5 +1,6 @@
|
|||
local Job = require "plenary.job"
|
||||
local ts_utils = require "gopher._utils.ts"
|
||||
local u = require "gopher._utils"
|
||||
local M = {}
|
||||
|
||||
---@param cmd_args table
|
||||
|
|
@ -10,11 +11,11 @@ local function run(cmd_args)
|
|||
args = cmd_args,
|
||||
on_exit = function(_, retval)
|
||||
if retval ~= 0 then
|
||||
print("command exited with code " .. retval)
|
||||
u.notify("command 'go " .. unpack(cmd_args) .. "' exited with code " .. retval, "error")
|
||||
return
|
||||
end
|
||||
|
||||
print "unit test(s) generated"
|
||||
u.notify("unit test(s) generated", "info")
|
||||
end,
|
||||
})
|
||||
:start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue