Skip to content

Commit 97bebb6

Browse files
blehreroriori1703
andcommitted
declare vim.ui.select opt format_item
Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com>
1 parent fac4966 commit 97bebb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/kickstart/plugins/debug.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ return {
7878
},
7979
}
8080
local menu_options = {}
81-
for k, v in pairs(props) do
82-
table.insert(menu_options, ('%s: %s'):format(k, v.value))
81+
for k, _ in pairs(props) do
82+
table.insert(menu_options, k)
8383
end
8484
vim.ui.select(menu_options, {
8585
prompt = 'Edit Breakpoint',
86+
format_item = function(item) return ('%s: %s'):format(item, props[item].value) end,
8687
}, function(choice)
87-
local prompt = (tostring(choice)):gsub(':.*', '')
8888
props[prompt].setter(vim.fn.input {
8989
prompt = ('[%s] '):format(prompt),
9090
default = props[prompt].value,

0 commit comments

Comments
 (0)