workflow fix

pull/28/head
ray-x 3 years ago
parent c0771b93c8
commit d9e0a4be9f

@ -4,9 +4,9 @@ local api = vim.api
local utils = require("go.utils")
local log = utils.log
local max_len = _GO_NVIM_CFG.max_line_len or 120
local goimport = _GO_NVIM_CFG.goimport ~= nil and _GO_NVIM_CFG.goimport or "gofumports"
local gofmt = _GO_NVIM_CFG.gofmt ~= nil and _GO_NVIM_CFG.gofmt or "gofumpt"
local gofmt_args = _GO_NVIM_CFG.gofmt_args and _GO_NVIM_CFG.gofmt_args
local goimport = _GO_NVIM_CFG.goimport or "gofumports"
local gofmt = _GO_NVIM_CFG.gofmt or "gofumpt"
local gofmt_args = _GO_NVIM_CFG.gofmt_args
or {"--max-len=" .. tostring(max_len), "--base-formatter=" .. gofmt}
local goimport_args = _GO_NVIM_CFG.goimport_args
@ -115,8 +115,8 @@ M.goimport = function(...)
if args and _GO_NVIM_CFG.goimport == 'goimports' then
run(args, true, 'goimports')
else
utils.copy_array(goimport_args, a)
run({}, true)
-- utils.copy_array(goimport_args, a)
run(goimport_args, true)
end
end

@ -114,6 +114,7 @@ describe("should run gofmt", function()
vim.wait(200, function()
end)
local fmt = vim.fn.join(vim.fn.readfile(path), "\n")
print(vim.inspect(fmt))
-- eq(expected, fmt)
eq(1, 1) -- still not working
cmd = "bd! " .. path

Loading…
Cancel
Save