mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix: correct versions in deprecation warnings
The following functions should be removed in 0.12 according to the deprecation strategy in MAINTAIN.md: - vim.lsp.util.extract_completion_items() - vim.lsp.util.parse_snippet() - vim.lsp.util.text_document_completion_list_to_complete_items()
This commit is contained in:
parent
5f9d4d8afe
commit
5cb906e91c
@ -553,7 +553,7 @@ end
|
|||||||
---@return lsp.CompletionItem[] List of completion items
|
---@return lsp.CompletionItem[] List of completion items
|
||||||
---@see https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
|
---@see https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
|
||||||
function M.extract_completion_items(result)
|
function M.extract_completion_items(result)
|
||||||
vim.deprecate('vim.lsp.util.extract_completion_items()', nil, '0.11')
|
vim.deprecate('vim.lsp.util.extract_completion_items()', nil, '0.12')
|
||||||
if type(result) == 'table' and result.items then
|
if type(result) == 'table' and result.items then
|
||||||
-- result is a `CompletionList`
|
-- result is a `CompletionList`
|
||||||
return result.items
|
return result.items
|
||||||
@ -613,7 +613,7 @@ end
|
|||||||
---@param input string unparsed snippet
|
---@param input string unparsed snippet
|
||||||
---@return string parsed snippet
|
---@return string parsed snippet
|
||||||
function M.parse_snippet(input)
|
function M.parse_snippet(input)
|
||||||
vim.deprecate('vim.lsp.util.parse_snippet()', nil, '0.11')
|
vim.deprecate('vim.lsp.util.parse_snippet()', nil, '0.12')
|
||||||
local ok, parsed = pcall(function()
|
local ok, parsed = pcall(function()
|
||||||
return snippet.parse(input)
|
return snippet.parse(input)
|
||||||
end)
|
end)
|
||||||
@ -635,7 +635,7 @@ end
|
|||||||
---@return table[] items
|
---@return table[] items
|
||||||
---@see complete-items
|
---@see complete-items
|
||||||
function M.text_document_completion_list_to_complete_items(result, prefix)
|
function M.text_document_completion_list_to_complete_items(result, prefix)
|
||||||
vim.deprecate('vim.lsp.util.text_document_completion_list_to_complete_items()', nil, '0.11')
|
vim.deprecate('vim.lsp.util.text_document_completion_list_to_complete_items()', nil, '0.12')
|
||||||
return require('vim.lsp._completion')._lsp_to_complete_items(result, prefix)
|
return require('vim.lsp._completion')._lsp_to_complete_items(result, prefix)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user