spec updates
This commit is contained in:
parent
1e852f3a93
commit
4a5866562a
@ -253,11 +253,12 @@ write", "source", "source.organizeImports" }
|
||||
-- only this action 'refactor.rewrite' source.organizeImports
|
||||
M.codeaction = function(action, only, hdlr)
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
log(action, only)
|
||||
if only then
|
||||
params.context = { only = { only } }
|
||||
end
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
|
||||
log(action, only, bufnr)
|
||||
vim.lsp.buf_request_all(bufnr, 'textDocument/codeAction', params, function(result)
|
||||
if not result or next(result) == nil then
|
||||
log('nil result')
|
||||
|
@ -64,14 +64,14 @@ describe('should run gopls releated functions', function()
|
||||
|
||||
_GO_NVIM_CFG.log_path = '' -- enable log to console
|
||||
require('go.format').goimport()
|
||||
vim.wait(2000, function() end)
|
||||
|
||||
vim.cmd([[wa]])
|
||||
print('workspaces:', vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
local fmt = vim.fn.join(vim.fn.readfile(path), '\n')
|
||||
print(vim.inspect(fmt))
|
||||
for _ = 1, 5 do
|
||||
vim.wait(1000, function() end)
|
||||
for _ = 1, 6 do
|
||||
require('go.utils').log('waiting for import')
|
||||
vim.wait(1000, function() return false end)
|
||||
if expected == fmt then
|
||||
break
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user