aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-12-10 21:20:30 +0100
committerGitHub <noreply@github.com>2021-12-10 13:20:30 -0700
commit2a9aadd09babebad7dd03a08b3bac083173ca174 (patch)
tree04e1ab035816af9a8332bb6707b4a083992f1904 /runtime/lua/vim/lsp/handlers.lua
parent63528f4686d3f600af1858486bb3c2c887203b63 (diff)
downloadrneovim-2a9aadd09babebad7dd03a08b3bac083173ca174.tar.gz
rneovim-2a9aadd09babebad7dd03a08b3bac083173ca174.tar.bz2
rneovim-2a9aadd09babebad7dd03a08b3bac083173ca174.zip
refactor: replace deprecated lua functions with their new versions (#16603)
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>
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 22089aaaa6..c974d1a6b4 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -285,7 +285,7 @@ local function location_handler(_, result, ctx, _)
util.jump_to_location(result[1])
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")
end
else
@@ -379,7 +379,7 @@ local make_call_hierarchy_handler = function(direction)
})
end
end
- util.set_qflist(items)
+ vim.fn.setqflist({}, ' ', {title = 'LSP call hierarchy', items = items})
api.nvim_command("copen")
end
end