refactor: replace deprecated lua functions with their new versions (#16609)

Calling vim.lsp.buf.definition() sometimes gives a deprecation warning.
This will likely solve that.

Co-authored-by: Christian Clason <christian.clason@uni-due.de>
This commit is contained in:
github-actions[bot] 2021-12-10 13:24:49 -07:00 committed by GitHub
parent 08ddfa9851
commit 2cd272decb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,7 +285,7 @@ local function location_handler(_, result, ctx, _)
util.jump_to_location(result[1]) util.jump_to_location(result[1])
if #result > 1 then if #result > 1 then
util.set_qflist(util.locations_to_items(result)) vim.fn.setqflist({}, ' ', {title = 'LSP locations', items = util.locations_to_items(result)})
api.nvim_command("copen") api.nvim_command("copen")
end end
else else
@ -379,7 +379,7 @@ local make_call_hierarchy_handler = function(direction)
}) })
end end
end end
util.set_qflist(items) vim.fn.setqflist({}, ' ', {title = 'LSP call hierarchy', items = items})
api.nvim_command("copen") api.nvim_command("copen")
end end
end end