This commit is contained in:
TJ DeVries
2020-10-08 22:56:51 -04:00
parent 2ce3ad61aa
commit 376959e7df

View File

@@ -144,8 +144,10 @@ builtin.lsp_references = function(opts)
local results_lsp = vim.lsp.buf_request_sync(0, "textDocument/references", params, opts.timeout or 10000)
local locations = {}
for _, server_results in pairs(results_lsp) do
if server_results.result then
vim.list_extend(locations, vim.lsp.util.locations_to_items(server_results.result) or {})
end
end
if vim.tbl_isempty(locations) then
return
@@ -279,8 +281,10 @@ builtin.lsp_workspace_symbols = function(opts)
local locations = {}
for _, server_results in pairs(results_lsp) do
if server_results.result then
vim.list_extend(locations, vim.lsp.util.symbols_to_items(server_results.result, 0) or {})
end
end
if vim.tbl_isempty(locations) then
return