In the context of developing a plug-in, what is the most portable (various versions of
nvim, ...) and readable way to implement a "menu" similar to what
:tselect gives i.e. that
- appears in the bottom and takes as much screen as necessary
- paginates the content if there are too many entries to fit on a single screen
- implements the commands to navigate the list
- enumerates and indexes the entries
- waits for an input for the selected entry (or defaults to cancelling)
This could be hacked together using a buffer, remapping, etc. but there must be a simpler way to do such a common thing.
Ideally, I would like to pass the structured data and receive back the selected index.