2 files changed,
20 insertions(+),
0 deletions(-)
Author:
Smirnov Olexander
ss2316544@gmail.com
Committed at:
2022-05-31 00:51:44 +0300
Parent:
49d9913
jump to
| A | lua/gopher/gomod.lua |
| M | lua/gopher/init.lua |
A
lua/gopher/gomod.lua
@@ -0,0 +1,19 @@
+local Job = require "plenary.job" + +return function(...) + local args = { ... } + local cmd_args = vim.list_extend({ "mod" }, args) + + Job + :new({ + command = "go", + args = cmd_args, + on_exit = function(_, retval) + if retval ~= 0 then + print("command exited with code " .. retval) + return + end + end, + }) + :sync() +end
M
lua/gopher/init.lua
@@ -4,5 +4,6 @@
gopher.install_deps = require("gopher.installer").install_all gopher.tags_add = tags.add gopher.tags_rm = tags.remove +gopher.mod = require "gopher.gomod" return gopher