summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-10-08 22:56:51 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-10-08 22:56:51 -0400
commit376959e7df08693e9d95fa35d03c3e7bd7cef581 (patch)
tree6cd31018605b168eaa8bd23e924d47d938705328
parent2ce3ad61aa9342fff4d8be69fc9e019e393bf161 (diff)
fix: #125
-rw-r--r--lua/telescope/builtin.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua
index c483a7b..03cf2df 100644
--- a/lua/telescope/builtin.lua
+++ b/lua/telescope/builtin.lua
@@ -144,7 +144,9 @@ 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
- vim.list_extend(locations, vim.lsp.util.locations_to_items(server_results.result) or {})
+ 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
@@ -279,7 +281,9 @@ builtin.lsp_workspace_symbols = function(opts)
local locations = {}
for _, server_results in pairs(results_lsp) do
- vim.list_extend(locations, vim.lsp.util.symbols_to_items(server_results.result, 0) or {})
+ 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