neovim: format item in vim.ui.select telescope finder

This commit is contained in:
2024-03-11 10:51:23 +03:00
parent f061e881d0
commit bd3be25c6a

View File

@@ -60,10 +60,14 @@ vim.ui.select = function(items, opts, on_choice)
finder = finders.new_table({
results = items,
entry_maker = function(entry)
local format_item = opts.format_item or function(item)
return item
end
return {
value = entry,
display = entry,
ordinal = entry,
display = format_item(entry),
ordinal = format_item(entry),
}
end,
}),