Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lua/telescope/_extensions/ui-select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ return require("telescope").register_extension {
}
for idx, item in ipairs(items) do
local client_id, title
if vim.version and vim.version.cmp(vim.version(), vim.version.parse "0.10-dev") >= 0 then

if item[1] ~= nil and item[2] ~= nil and item[2].title ~= nil then
client_id = item[1]
title = item[2].title
elseif
item.ctx ~= nil
and item.ctx.client_id ~= nil
and item.action ~= nil
and item.action.title ~= nil
then
client_id = item.ctx.client_id
title = item.action.title
else
client_id = item[1]
title = item[2].title
vim.api.nvim_err_writeln "telescope-ui-select.nvim - Failed to get item information"
end

local client = vim.lsp.get_client_by_id(client_id)
Expand Down