mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
fix(lsp): deprecate vim.lsp.protocol.Methods
(#35998)
This commit is contained in:
@@ -211,7 +211,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
diagnosticProvider = {},
|
||||
},
|
||||
handlers = {
|
||||
[vim.lsp.protocol.Methods.textDocument_diagnostic] = function(_, params)
|
||||
['textDocument/diagnostic'] = function(_, params)
|
||||
_G.params = params
|
||||
_G.requests = _G.requests + 1
|
||||
end,
|
||||
@@ -421,7 +421,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
data = {},
|
||||
message = '',
|
||||
}, {}, {
|
||||
method = vim.lsp.protocol.Methods.textDocument_diagnostic,
|
||||
method = 'textDocument/diagnostic',
|
||||
client_id = client_id,
|
||||
bufnr = diagnostic_bufnr,
|
||||
})
|
||||
@@ -438,7 +438,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
data = { retriggerRequest = true },
|
||||
message = '',
|
||||
}, {}, {
|
||||
method = vim.lsp.protocol.Methods.textDocument_diagnostic,
|
||||
method = 'textDocument/diagnostic',
|
||||
client_id = client_id,
|
||||
bufnr = diagnostic_bufnr,
|
||||
})
|
||||
@@ -455,7 +455,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
data = { retriggerRequest = false },
|
||||
message = '',
|
||||
}, {}, {
|
||||
method = vim.lsp.protocol.Methods.textDocument_diagnostic,
|
||||
method = 'textDocument/diagnostic',
|
||||
client_id = client_id,
|
||||
bufnr = diagnostic_bufnr,
|
||||
})
|
||||
@@ -477,7 +477,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
_G.make_error('Pull Diagnostic', 4, 4, 4, 4),
|
||||
},
|
||||
}, {
|
||||
method = vim.lsp.protocol.Methods.textDocument_diagnostic,
|
||||
method = 'textDocument/diagnostic',
|
||||
params = {
|
||||
textDocument = { uri = fake_uri },
|
||||
},
|
||||
@@ -487,7 +487,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
vim.api.nvim_exec_autocmds('LspNotify', {
|
||||
buffer = diagnostic_bufnr,
|
||||
data = {
|
||||
method = vim.lsp.protocol.Methods.textDocument_didChange,
|
||||
method = 'textDocument/didChange',
|
||||
client_id = client_id,
|
||||
},
|
||||
})
|
||||
@@ -503,7 +503,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
kind = 'unchanged',
|
||||
resultId = 'squidward',
|
||||
}, {
|
||||
method = vim.lsp.protocol.Methods.textDocument_diagnostic,
|
||||
method = 'textDocument/diagnostic',
|
||||
params = {
|
||||
textDocument = { uri = fake_uri },
|
||||
},
|
||||
@@ -513,7 +513,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
vim.api.nvim_exec_autocmds('LspNotify', {
|
||||
buffer = diagnostic_bufnr,
|
||||
data = {
|
||||
method = vim.lsp.protocol.Methods.textDocument_didChange,
|
||||
method = 'textDocument/didChange',
|
||||
client_id = client_id,
|
||||
},
|
||||
})
|
||||
@@ -560,7 +560,7 @@ describe('vim.lsp.diagnostic', function()
|
||||
vim.api.nvim_exec_autocmds('LspNotify', {
|
||||
buffer = second_buf,
|
||||
data = {
|
||||
method = vim.lsp.protocol.Methods.textDocument_didChange,
|
||||
method = 'textDocument/didChange',
|
||||
client_id = client_id,
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user