neovim: format item in vim.ui.select telescope finder
This commit is contained in:
@@ -60,10 +60,14 @@ vim.ui.select = function(items, opts, on_choice)
|
|||||||
finder = finders.new_table({
|
finder = finders.new_table({
|
||||||
results = items,
|
results = items,
|
||||||
entry_maker = function(entry)
|
entry_maker = function(entry)
|
||||||
|
local format_item = opts.format_item or function(item)
|
||||||
|
return item
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
value = entry,
|
value = entry,
|
||||||
display = entry,
|
display = format_item(entry),
|
||||||
ordinal = entry,
|
ordinal = format_item(entry),
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user