refactor: add warnings for deprecated functions (#18662)

This commit is contained in:
dundargoc 2022-05-21 09:51:03 +02:00 committed by GitHub
parent 12f45fd697
commit 976f32aa7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1691,7 +1691,7 @@ end
--- ---
---@param items (table) list of items ---@param items (table) list of items
function M.set_loclist(items, win_id) function M.set_loclist(items, win_id)
vim.api.nvim_echo({ { 'vim.lsp.util.set_loclist is deprecated. See :h deprecated', 'WarningMsg' } }, true, {}) vim.deprecate('vim.lsp.util.set_loclist', 'setloclist', '0.8')
vim.fn.setloclist(win_id or 0, {}, ' ', { vim.fn.setloclist(win_id or 0, {}, ' ', {
title = 'Language Server', title = 'Language Server',
items = items, items = items,
@ -1705,7 +1705,7 @@ end
--- ---
---@param items (table) list of items ---@param items (table) list of items
function M.set_qflist(items) function M.set_qflist(items)
vim.api.nvim_echo({ { 'vim.lsp.util.set_qflist is deprecated. See :h deprecated', 'WarningMsg' } }, true, {}) vim.deprecate('vim.lsp.util.set_qflist', 'setqflist', '0.8')
vim.fn.setqflist({}, ' ', { vim.fn.setqflist({}, ' ', {
title = 'Language Server', title = 'Language Server',
items = items, items = items,