refactor: migrate to vim.notify from prints

This commit is contained in:
Smirnov Oleksandr 2022-06-24 15:27:08 +03:00
parent b4fd34ec17
commit 0b415c32e8
8 changed files with 40 additions and 22 deletions

View file

@ -1,4 +1,5 @@
local Job = require "plenary.job"
local u = require "gopher._utils"
---run "go mod"
return function(...)
@ -11,11 +12,11 @@ return function(...)
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
else
print "command runs successfully"
end
u.notify("go mod was success runned", "info")
end,
})
:start()