refactor: commands runner (#42)
* feat(utils): first impl of own commands runner * refactor(gotests): uses own runner instead of vendored * refactor(utils): back to plenary.job * refactor(gotests): use new runner, clean code * fix(runner): now it returns output correctly * refactor(iferr): use vim.system i have tried to use _utils.runner, but i can't figure out how to make `< file.go` for the command * refactor(impl): use new runner * refactor(installer): use new runner * refactor(struct_tags): use new runner * refactor: commands such as :GoGet runs with new runner * refactor: throw errors in more lua way, i think * refactor(utils): notify now has title * refactor: use more correct way of notifying * refactor(runner): write error message on error
This commit is contained in:
parent
011769b99b
commit
2e89cea6f3
11 changed files with 163 additions and 178 deletions
|
|
@ -1,43 +0,0 @@
|
||||||
local Job = require "plenary.job"
|
|
||||||
local c = require("gopher.config").commands
|
|
||||||
local u = require "gopher._utils"
|
|
||||||
|
|
||||||
---Run any go commands like `go generate`, `go get`, `go mod`
|
|
||||||
---@param cmd string
|
|
||||||
---@param ... string|string[]
|
|
||||||
return function(cmd, ...)
|
|
||||||
local args = { ... }
|
|
||||||
if #args == 0 then
|
|
||||||
u.deferred_notify("please provice any arguments", vim.log.levels.ERROR)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if cmd == "generate" and #args == 1 and args[1] == "%" then
|
|
||||||
args[1] = vim.fn.expand "%" ---@diagnostic disable-line: missing-parameter
|
|
||||||
elseif cmd == "get" then
|
|
||||||
for i, arg in ipairs(args) do
|
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
|
||||||
local m = string.match(arg, "^https://(.*)$") or string.match(arg, "^http://(.*)$") or arg
|
|
||||||
table.remove(args, i)
|
|
||||||
table.insert(args, i, m)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local cmd_args = vim.list_extend({ cmd }, args) ---@diagnostic disable-line: missing-parameter
|
|
||||||
Job:new({
|
|
||||||
command = c.go,
|
|
||||||
args = cmd_args,
|
|
||||||
on_exit = function(_, retval)
|
|
||||||
if retval ~= 0 then
|
|
||||||
u.deferred_notify(
|
|
||||||
"command 'go " .. unpack(cmd_args) .. "' exited with code " .. retval,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
u.deferred_notify(cmd .. " " .. unpack(cmd_args), vim.log.levels.DEBUG)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
u.deferred_notify("go " .. cmd .. " was success runned", vim.log.levels.INFO)
|
|
||||||
end,
|
|
||||||
}):start()
|
|
||||||
end
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
local utils = {}
|
local utils = {}
|
||||||
|
|
||||||
|
local TITLE = "gopher.nvim"
|
||||||
|
|
||||||
---@param t table
|
---@param t table
|
||||||
---@return boolean
|
---@return boolean
|
||||||
function utils.is_tbl_empty(t)
|
function utils.is_tbl_empty(t)
|
||||||
|
|
@ -10,13 +12,24 @@ function utils.is_tbl_empty(t)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param msg string
|
---@param msg string
|
||||||
---@param lvl any
|
---@param lvl number
|
||||||
function utils.deferred_notify(msg, lvl)
|
function utils.deferred_notify(msg, lvl)
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
vim.notify(msg, lvl)
|
vim.notify(msg, lvl, {
|
||||||
|
title = TITLE,
|
||||||
|
})
|
||||||
end, 0)
|
end, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param msg string
|
||||||
|
---@param lvl? number
|
||||||
|
function utils.notify(msg, lvl)
|
||||||
|
lvl = lvl or vim.log.levels.INFO
|
||||||
|
vim.notify(msg, lvl, {
|
||||||
|
title = TITLE,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- safe require
|
-- safe require
|
||||||
---@param module string module name
|
---@param module string module name
|
||||||
function utils.sreq(module)
|
function utils.sreq(module)
|
||||||
|
|
|
||||||
53
lua/gopher/_utils/runner/gocmd.lua
Normal file
53
lua/gopher/_utils/runner/gocmd.lua
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
local r = require "gopher._utils.runner"
|
||||||
|
local c = require("gopher.config").commands
|
||||||
|
local u = require "gopher._utils"
|
||||||
|
local gocmd = {}
|
||||||
|
|
||||||
|
---@param args string[]
|
||||||
|
---@return string[]
|
||||||
|
local function if_get(args)
|
||||||
|
for i, arg in ipairs(args) do
|
||||||
|
local m = string.match(arg, "^https://(.*)$") or string.match(arg, "^http://(.*)$") or arg
|
||||||
|
table.remove(args, i)
|
||||||
|
table.insert(args, i, m)
|
||||||
|
end
|
||||||
|
return args
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param args unknown[]
|
||||||
|
---@return string[]
|
||||||
|
local function if_generate(args)
|
||||||
|
if #args == 1 and args[1] == "%" then
|
||||||
|
args[1] = vim.fn.expand "%"
|
||||||
|
end
|
||||||
|
return args
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param subcmd string
|
||||||
|
---@param args string[]
|
||||||
|
---@return string[]|nil
|
||||||
|
function gocmd.run(subcmd, args)
|
||||||
|
if #args == 0 then
|
||||||
|
error "please provice any arguments"
|
||||||
|
end
|
||||||
|
|
||||||
|
if subcmd == "get" then
|
||||||
|
args = if_get(args)
|
||||||
|
end
|
||||||
|
|
||||||
|
if subcmd == "generate" then
|
||||||
|
args = if_generate(args)
|
||||||
|
end
|
||||||
|
|
||||||
|
return r.sync(c.go, {
|
||||||
|
args = { subcmd, unpack(args) },
|
||||||
|
on_exit = function(data, status)
|
||||||
|
if status ~= 0 then
|
||||||
|
error("gocmd failed: " .. data)
|
||||||
|
end
|
||||||
|
u.notify(c.go .. " " .. subcmd .. " successful runned")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return gocmd
|
||||||
33
lua/gopher/_utils/runner/init.lua
Normal file
33
lua/gopher/_utils/runner/init.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
local Job = require "plenary.job"
|
||||||
|
local runner = {}
|
||||||
|
|
||||||
|
---@class gopher.RunnerOpts
|
||||||
|
---@field args? string[]
|
||||||
|
---@field cwd? string?
|
||||||
|
---@field on_exit? fun(data:string, status:number)
|
||||||
|
|
||||||
|
---@param cmd string
|
||||||
|
---@param opts gopher.RunnerOpts
|
||||||
|
---@return string[]|nil
|
||||||
|
function runner.sync(cmd, opts)
|
||||||
|
local output
|
||||||
|
Job:new({
|
||||||
|
command = cmd,
|
||||||
|
args = opts.args,
|
||||||
|
cwd = opts.cwd,
|
||||||
|
on_stderr = function(_, data)
|
||||||
|
vim.print(data)
|
||||||
|
end,
|
||||||
|
on_exit = function(data, status)
|
||||||
|
output = data:result()
|
||||||
|
vim.schedule(function()
|
||||||
|
if opts.on_exit then
|
||||||
|
opts.on_exit(output, status)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}):sync(60000 --[[1 min]])
|
||||||
|
return output
|
||||||
|
end
|
||||||
|
|
||||||
|
return runner
|
||||||
|
|
@ -1,74 +1,45 @@
|
||||||
local c = require("gopher.config").commands
|
local c = require("gopher.config").commands
|
||||||
local u = require "gopher._utils"
|
|
||||||
local ts_utils = require "gopher._utils.ts"
|
local ts_utils = require "gopher._utils.ts"
|
||||||
local Job = require "plenary.job"
|
local r = require "gopher._utils.runner"
|
||||||
|
local u = require "gopher._utils"
|
||||||
local gotests = {}
|
local gotests = {}
|
||||||
|
|
||||||
---@param cmd_args table
|
|
||||||
local function run(cmd_args)
|
|
||||||
Job:new({
|
|
||||||
command = c.gotests,
|
|
||||||
args = cmd_args,
|
|
||||||
on_exit = function(_, retval)
|
|
||||||
if retval ~= 0 then
|
|
||||||
u.deferred_notify(
|
|
||||||
"command '" .. c.gotests .. " " .. unpack(cmd_args) .. "' exited with code " .. retval,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
u.deferred_notify("unit test(s) generated", vim.log.levels.INFO)
|
|
||||||
end,
|
|
||||||
}):start()
|
|
||||||
end
|
|
||||||
|
|
||||||
---@param args table
|
---@param args table
|
||||||
local function add_test(args)
|
local function add_test(args)
|
||||||
local fpath = vim.fn.expand "%" ---@diagnostic disable-line: missing-parameter
|
|
||||||
table.insert(args, "-w")
|
table.insert(args, "-w")
|
||||||
table.insert(args, fpath)
|
table.insert(args, vim.fn.expand "%")
|
||||||
run(args)
|
|
||||||
|
return r.sync(c.gotests, {
|
||||||
|
args = args,
|
||||||
|
on_exit = function(data, status)
|
||||||
|
if not status == 0 then
|
||||||
|
error("gotests failed: " .. data)
|
||||||
|
end
|
||||||
|
|
||||||
|
u.notify "unit test(s) generated"
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
---generate unit test for one function
|
---generate unit test for one function
|
||||||
---@param parallel boolean
|
function gotests.func_test()
|
||||||
function gotests.func_test(parallel)
|
|
||||||
local ns = ts_utils.get_func_method_node_at_pos(unpack(vim.api.nvim_win_get_cursor(0)))
|
local ns = ts_utils.get_func_method_node_at_pos(unpack(vim.api.nvim_win_get_cursor(0)))
|
||||||
if ns == nil or ns.name == nil then
|
if ns == nil or ns.name == nil then
|
||||||
u.deferred_notify("cursor on func/method and execute the command again", vim.log.levels.INFO)
|
u.notify("cursor on func/method and execute the command again", vim.log.levels.WARN)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local cmd_args = { "-only", ns.name }
|
add_test { "-only", ns.name }
|
||||||
if parallel then
|
|
||||||
table.insert(cmd_args, "-parallel")
|
|
||||||
end
|
|
||||||
|
|
||||||
add_test(cmd_args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---generate unit tests for all functions in current file
|
---generate unit tests for all functions in current file
|
||||||
---@param parallel boolean
|
function gotests.all_tests()
|
||||||
function gotests.all_tests(parallel)
|
add_test { "-all" }
|
||||||
local cmd_args = { "-all" }
|
|
||||||
if parallel then
|
|
||||||
table.insert(cmd_args, "-parallel")
|
|
||||||
end
|
|
||||||
|
|
||||||
add_test(cmd_args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---generate unit tests for all exported functions
|
---generate unit tests for all exported functions
|
||||||
---@param parallel boolean
|
function gotests.all_exported_tests()
|
||||||
function gotests.all_exported_tests(parallel)
|
add_test { "-exported" }
|
||||||
local cmd_args = {}
|
|
||||||
if parallel then
|
|
||||||
table.insert(cmd_args, "-parallel")
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(cmd_args, "-exported")
|
|
||||||
add_test(cmd_args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return gotests
|
return gotests
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,16 @@
|
||||||
local c = require("gopher.config").commands
|
local c = require("gopher.config").commands
|
||||||
local u = require "gopher._utils"
|
|
||||||
local iferr = {}
|
local iferr = {}
|
||||||
|
|
||||||
-- That's Lua of vimscript implementation of: github.com/koron/iferr
|
-- That's Lua of vimscript implementation of: github.com/koron/iferr
|
||||||
iferr.iferr = function()
|
function iferr.iferr()
|
||||||
local boff = vim.fn.wordcount().cursor_bytes
|
local boff = vim.fn.wordcount().cursor_bytes
|
||||||
local cmd = (c.iferr .. " -pos " .. boff)
|
local pos = vim.fn.getcurpos()[2]
|
||||||
local data = vim.fn.systemlist(cmd, vim.fn.bufnr "%")
|
|
||||||
|
|
||||||
|
local data = vim.fn.systemlist((c.iferr .. " -pos " .. boff), vim.fn.bufnr "%")
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
u.deferred_notify(
|
error("iferr failed: " .. data)
|
||||||
"command " .. cmd .. " exited with code " .. vim.v.shell_error,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos = vim.fn.getcurpos()[2]
|
|
||||||
vim.fn.append(pos, data)
|
vim.fn.append(pos, data)
|
||||||
vim.cmd [[silent normal! j=2j]]
|
vim.cmd [[silent normal! j=2j]]
|
||||||
vim.fn.setpos(".", pos)
|
vim.fn.setpos(".", pos)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local c = require("gopher.config").commands
|
local c = require("gopher.config").commands
|
||||||
local Job = require "plenary.job"
|
local r = require "gopher._utils.runner"
|
||||||
local ts_utils = require "gopher._utils.ts"
|
local ts_utils = require "gopher._utils.ts"
|
||||||
local u = require "gopher._utils"
|
local u = require "gopher._utils"
|
||||||
local impl = {}
|
local impl = {}
|
||||||
|
|
@ -47,33 +47,23 @@ function impl.impl(...)
|
||||||
recv = string.format("%s %s", recv_name, recv)
|
recv = string.format("%s %s", recv_name, recv)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- stylua: ignore
|
local output = r.sync(c.impl, {
|
||||||
local cmd_args = {
|
args = {
|
||||||
"-dir", vim.fn.fnameescape(vim.fn.expand "%:p:h"), ---@diagnostic disable-line: missing-parameter
|
"-dir",
|
||||||
recv,
|
vim.fn.fnameescape(vim.fn.expand "%:p:h" --[[@as string]]),
|
||||||
iface
|
recv,
|
||||||
}
|
iface,
|
||||||
|
},
|
||||||
local res_data
|
on_exit = function(data, status)
|
||||||
Job:new({
|
if not status == 0 then
|
||||||
command = c.impl,
|
error("impl failed: " .. data)
|
||||||
args = cmd_args,
|
|
||||||
on_exit = function(data, retval)
|
|
||||||
if retval ~= 0 then
|
|
||||||
u.deferred_notify(
|
|
||||||
"command '" .. c.impl .. " " .. unpack(cmd_args) .. "' exited with code " .. retval,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
res_data = data:result()
|
|
||||||
end,
|
end,
|
||||||
}):sync()
|
})
|
||||||
|
|
||||||
local pos = vim.fn.getcurpos()[2]
|
local pos = vim.fn.getcurpos()[2]
|
||||||
table.insert(res_data, 1, "")
|
table.insert(output, 1, "")
|
||||||
vim.fn.append(pos, res_data)
|
vim.fn.append(pos, output)
|
||||||
end
|
end
|
||||||
|
|
||||||
return impl
|
return impl
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local tags = require "gopher.struct_tags"
|
local tags = require "gopher.struct_tags"
|
||||||
local tests = require "gopher.gotests"
|
local tests = require "gopher.gotests"
|
||||||
local uc = require "gopher._utils.commands"
|
local gocmd = require("gopher._utils.runner.gocmd").run
|
||||||
local gopher = {}
|
local gopher = {}
|
||||||
|
|
||||||
gopher.setup = require("gopher.config").setup
|
gopher.setup = require("gopher.config").setup
|
||||||
|
|
@ -17,19 +17,19 @@ gopher.test_exported = tests.all_exported_tests
|
||||||
gopher.tests_all = tests.all_tests
|
gopher.tests_all = tests.all_tests
|
||||||
|
|
||||||
gopher.get = function(...)
|
gopher.get = function(...)
|
||||||
uc("get", ...)
|
gocmd("get", { ... })
|
||||||
end
|
end
|
||||||
|
|
||||||
gopher.mod = function(...)
|
gopher.mod = function(...)
|
||||||
uc("mod", ...)
|
gocmd("mod", { ... })
|
||||||
end
|
end
|
||||||
|
|
||||||
gopher.generate = function(...)
|
gopher.generate = function(...)
|
||||||
uc("generate", ...)
|
gocmd("generate", { ... })
|
||||||
end
|
end
|
||||||
|
|
||||||
gopher.work = function(...)
|
gopher.work = function(...)
|
||||||
uc("work", ...)
|
gocmd("work", { ... })
|
||||||
end
|
end
|
||||||
|
|
||||||
return gopher
|
return gopher
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local Job = require "plenary.job"
|
|
||||||
local c = require("gopher.config").commands
|
local c = require("gopher.config").commands
|
||||||
|
local r = require "gopher._utils.runner"
|
||||||
local u = require "gopher._utils"
|
local u = require "gopher._utils"
|
||||||
local installer = {}
|
local installer = {}
|
||||||
|
|
||||||
|
|
@ -14,22 +14,16 @@ local urls = {
|
||||||
---@param pkg string
|
---@param pkg string
|
||||||
local function install(pkg)
|
local function install(pkg)
|
||||||
local url = urls[pkg] .. "@latest"
|
local url = urls[pkg] .. "@latest"
|
||||||
|
r.sync(c.go, {
|
||||||
Job:new({
|
|
||||||
command = c.go,
|
|
||||||
args = { "install", url },
|
args = { "install", url },
|
||||||
on_exit = function(_, retval)
|
on_exit = function(data, status)
|
||||||
if retval ~= 0 then
|
if not status == 0 then
|
||||||
u.deferred_notify(
|
error("go install failed: " .. data)
|
||||||
"command 'go install " .. url .. "' exited with code " .. retval,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
u.notify("installed: " .. url)
|
||||||
u.deferred_notify("install " .. url .. " finished", vim.log.levels.INFO)
|
|
||||||
end,
|
end,
|
||||||
}):start()
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
---Install required go deps
|
---Install required go deps
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
local ts_utils = require "gopher._utils.ts"
|
local ts_utils = require "gopher._utils.ts"
|
||||||
local Job = require "plenary.job"
|
local r = require "gopher._utils.runner"
|
||||||
local c = require("gopher.config").commands
|
local c = require("gopher.config").commands
|
||||||
local u = require "gopher._utils"
|
|
||||||
local struct_tags = {}
|
local struct_tags = {}
|
||||||
|
|
||||||
local function modify(...)
|
local function modify(...)
|
||||||
|
|
@ -39,45 +38,26 @@ local function modify(...)
|
||||||
table.insert(cmd_args, "json")
|
table.insert(cmd_args, "json")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get result of "gomodifytags" works
|
local output = r.sync(c.gomodifytags, {
|
||||||
local res_data
|
|
||||||
Job:new({
|
|
||||||
command = c.gomodifytags,
|
|
||||||
args = cmd_args,
|
args = cmd_args,
|
||||||
on_exit = function(data, retval)
|
on_exit = function(data, status)
|
||||||
if retval ~= 0 then
|
if not status == 0 then
|
||||||
u.deferred_notify(
|
error("gotag failed: " .. data)
|
||||||
"command '"
|
|
||||||
.. c.gomodifytags
|
|
||||||
.. " "
|
|
||||||
.. unpack(cmd_args)
|
|
||||||
.. "' exited with code "
|
|
||||||
.. retval,
|
|
||||||
vim.log.levels.ERROR
|
|
||||||
)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
res_data = data:result()
|
|
||||||
end,
|
end,
|
||||||
}):sync()
|
})
|
||||||
|
|
||||||
-- decode goted value
|
-- decode goted value
|
||||||
local tagged = vim.json.decode(table.concat(res_data))
|
local tagged = vim.json.decode(table.concat(output))
|
||||||
if
|
if
|
||||||
tagged.errors ~= nil
|
tagged.errors ~= nil
|
||||||
or tagged.lines == nil
|
or tagged.lines == nil
|
||||||
or tagged["start"] == nil
|
or tagged["start"] == nil
|
||||||
or tagged["start"] == 0
|
or tagged["start"] == 0
|
||||||
then
|
then
|
||||||
u.deferred_notify("failed to set tags " .. vim.inspect(tagged), vim.log.levels.ERROR)
|
error("failed to set tags " .. vim.inspec(tagged))
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, v in ipairs(tagged.lines) do
|
|
||||||
tagged.lines[i] = u.rtrim(v)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- write goted tags
|
|
||||||
vim.api.nvim_buf_set_lines(
|
vim.api.nvim_buf_set_lines(
|
||||||
0,
|
0,
|
||||||
tagged.start - 1,
|
tagged.start - 1,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
command! -nargs=* GoTagAdd :lua require"gopher".tags_add(<f-args>)
|
command! -nargs=* GoTagAdd :lua require"gopher".tags_add(<f-args>)
|
||||||
command! -nargs=* GoTagRm :lua require"gopher".tags_rm(<f-args>)
|
command! -nargs=* GoTagRm :lua require"gopher".tags_rm(<f-args>)
|
||||||
command! -nargs=* GoTestAdd :lua require"gopher".test_add(<f-args>)
|
command! GoTestAdd :lua require"gopher".test_add()
|
||||||
command! -nargs=* GoTestsAll :lua require"gopher".tests_all(<f-args>)
|
command! GoTestsAll :lua require"gopher".tests_all()
|
||||||
command! -nargs=* GoTestsExp :lua require"gopher".test_exported(<f-args>)
|
command! GoTestsExp :lua require"gopher".test_exported()
|
||||||
command! -nargs=* GoMod :lua require"gopher".mod(<f-args>)
|
command! -nargs=* GoMod :lua require"gopher".mod(<f-args>)
|
||||||
command! -nargs=* GoGet :lua require"gopher".get(<f-args>)
|
command! -nargs=* GoGet :lua require"gopher".get(<f-args>)
|
||||||
command! -nargs=* GoWork :lua require"gopher".work(<f-args>)
|
command! -nargs=* GoWork :lua require"gopher".work(<f-args>)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue