charmbracelet / bubbles

TUI components for Bubble Tea 🫧

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

textinput autocomplete - suggestions at any position

xvandish opened this issue · comments

Is your feature request related to a problem? Please describe.
No.

Context
I'm building a TUI that reaches out to a code search engine. The backend engine accepts tokens for modifying the query, like file:, repo:, archived:yes|no, etc. Some tokens can be repeated, and tokens can be included anywhere in the query. For example, hello file:.hs or file:.hs hello.

The new suggestions implementation (tks @toadle !) only displays suggestions at the 0th offset, e.g, only at the start of input. Once the first word has been typed, suggestions no longer appear.

Describe the solution you'd like

I'd like to display suggestions at any position within the text input.

I'd also like to be able to mark suggestions as repeatable/or-not. This is much less important, and complicates the code a fair amount.

Describe alternatives you've considered
None, really.

I get how hard maintaining/implementing open source feature reqs is, so I'm going to try this on my own and then come back and see what parts, if/any, you all would like to port back in.

+1 for this feature! Could be an option between the two behaviors