mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fix(lsp): revert buf_versions deprecation/replacement (#29217)
* Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)" This reverts commit2e6d295f79. * Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)" This reverts commit5c33815448.
This commit is contained in:
committed by
GitHub
parent
6c7677e5d2
commit
6e45cd7f00
@@ -111,7 +111,6 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('buffer is highlighted when attached', function()
|
||||
insert(text)
|
||||
exec_lua([[
|
||||
bufnr = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_win_set_buf(0, bufnr)
|
||||
@@ -119,6 +118,8 @@ describe('semantic token highlighting', function()
|
||||
client_id = vim.lsp.start({ name = 'dummy', cmd = server.cmd })
|
||||
]])
|
||||
|
||||
insert(text)
|
||||
|
||||
screen:expect {
|
||||
grid = [[
|
||||
#include <iostream> |
|
||||
@@ -140,7 +141,6 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('use LspTokenUpdate and highlight_token', function()
|
||||
insert(text)
|
||||
exec_lua([[
|
||||
vim.api.nvim_create_autocmd("LspTokenUpdate", {
|
||||
callback = function(args)
|
||||
@@ -157,6 +157,8 @@ describe('semantic token highlighting', function()
|
||||
client_id = vim.lsp.start({ name = 'dummy', cmd = server.cmd })
|
||||
]])
|
||||
|
||||
insert(text)
|
||||
|
||||
screen:expect {
|
||||
grid = [[
|
||||
#include <iostream> |
|
||||
@@ -178,17 +180,14 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('buffer is unhighlighted when client is detached', function()
|
||||
insert(text)
|
||||
|
||||
exec_lua([[
|
||||
bufnr = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_win_set_buf(0, bufnr)
|
||||
client_id = vim.lsp.start({ name = 'dummy', cmd = server.cmd })
|
||||
vim.wait(1000, function()
|
||||
return #server.messages > 1
|
||||
end)
|
||||
]])
|
||||
|
||||
insert(text)
|
||||
|
||||
exec_lua([[
|
||||
vim.notify = function() end
|
||||
vim.lsp.buf_detach_client(bufnr, client_id)
|
||||
@@ -332,13 +331,14 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('buffer is re-highlighted when force refreshed', function()
|
||||
insert(text)
|
||||
exec_lua([[
|
||||
bufnr = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_win_set_buf(0, bufnr)
|
||||
client_id = vim.lsp.start({ name = 'dummy', cmd = server.cmd })
|
||||
]])
|
||||
|
||||
insert(text)
|
||||
|
||||
screen:expect {
|
||||
grid = [[
|
||||
#include <iostream> |
|
||||
@@ -412,14 +412,13 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('updates highlights with delta request on buffer change', function()
|
||||
insert(text)
|
||||
|
||||
exec_lua([[
|
||||
bufnr = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_win_set_buf(0, bufnr)
|
||||
client_id = vim.lsp.start({ name = 'dummy', cmd = server.cmd })
|
||||
]])
|
||||
|
||||
insert(text)
|
||||
screen:expect {
|
||||
grid = [[
|
||||
#include <iostream> |
|
||||
@@ -598,7 +597,6 @@ describe('semantic token highlighting', function()
|
||||
end)
|
||||
|
||||
it('does not send delta requests if not supported by server', function()
|
||||
insert(text)
|
||||
exec_lua(
|
||||
[[
|
||||
local legend, response, edit_response = ...
|
||||
@@ -627,6 +625,7 @@ describe('semantic token highlighting', function()
|
||||
edit_response
|
||||
)
|
||||
|
||||
insert(text)
|
||||
screen:expect {
|
||||
grid = [[
|
||||
#include <iostream> |
|
||||
@@ -1450,7 +1449,6 @@ int main()
|
||||
},
|
||||
}) do
|
||||
it(test.it, function()
|
||||
insert(test.text1)
|
||||
exec_lua(create_server_definition)
|
||||
exec_lua(
|
||||
[[
|
||||
@@ -1487,6 +1485,8 @@ int main()
|
||||
test.response2
|
||||
)
|
||||
|
||||
insert(test.text1)
|
||||
|
||||
test.expected_screen1()
|
||||
|
||||
local highlights = exec_lua([[
|
||||
|
||||
Reference in New Issue
Block a user