Skip to content

Commit

Permalink
Replace vim.lsp.buf.server_ready in tests.
Browse files Browse the repository at this point in the history
It's deprecated and won't appear in neovim 0.10.

See neovim/neovim#23520

We're trying to make sure we get a response here, so just
call some other LSP method and see, though we may be able to
remove this entirely.
  • Loading branch information
Julian committed Jun 17, 2023
1 parent aa31776 commit 55632cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/tests/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ function helpers.wait_for_loading_pins(iv)
end

function helpers.wait_for_ready_lsp()
local succeeded, _ = vim.wait(15000, vim.lsp.buf.server_ready)
local succeeded, _ = vim.wait(15000, function()
return not not vim.lsp.buf_notify(0, '$/progress', {})
end)
assert.message('LSP server was never ready.').True(succeeded)
end

Expand Down

0 comments on commit 55632cd

Please sign in to comment.