Skip to content

feat(picker.select): add option to show or hide indexes#2698

Open
doums wants to merge 1 commit intofolke:mainfrom
doums:select_idx
Open

feat(picker.select): add option to show or hide indexes#2698
doums wants to merge 1 commit intofolke:mainfrom
doums:select_idx

Conversation

@doums
Copy link
Copy Markdown

@doums doums commented Jan 28, 2026

Hi, introduce the option show_idx to show (default) or hide the number indexes printed in front of each item in the picker of vim.ui.select.

Then we can disable the indexes:

opts.picker = {
  -- rest of the config
  sources = {
    select = {
      show_idx = false,
    },
  },

--  Or via vim.ui.select
vim.ui.select(items, {
  snacks = { show_idx = false }
}, callback)

This is useful for minimal UI for example, input hidden, no preview, just the title and the option list to navigate and select.

image

@github-actions github-actions Bot added picker size/m Medium PR (<50 lines changed) labels Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

picker size/m Medium PR (<50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant