nvim_runtime_lua

vim._core.ui

Methods1

function M.select_blocking(items: table, opts: table) -> nil | integer

Wait for |vim.ui.select()| and return the selected index. The default vim.ui.select impl (inputlist()) is synchronous, but this also handles async pickers (fzf-lua, telescope, …).

Parameters
itemstable

Items to choose from.

optstable

Forwarded to |vim.ui.select()|.

Returns
nil | integer

1-based index of the chosen item, or nil if cancelled/interrupted.