atlas-engineer / prompter

Live-narrowing, fuzzy-matching, extensible prompt framework.
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

+TITLE: Prompter

This library is heavily inspired by Emacs' minibuffer and [[https://emacs-helm.github.io/helm/][Helm]]. It only deals with the backend side of things, it does not handle any display.

The key objects are =prompters=, =sources= and =suggestions=.

A =prompt= is an interface for user interactions that holds one or more =sources=, and each of those are populated by =suggestions=.

Other central concepts include:

Example: Find below a graphical visualization of a single prompt with sources 1 and 2, and suggestions A, B, C and D. =Marks= is the list composed by Suggestions A and C. The =current-suggestion= is Suggestion B.

[[file:example.png]]

Remarks:

When =prompt= has multiple =sources=, while =current-suggestion= is always defined for =prompt=, it is empty for all but one of its =sources=.

=Marks= is a concept related to =source= not =prompt=, unlike that of =current-suggestion=. Thus, from the point of view of a =prompt='s object, the =marks= are the union of the =marks= of each of the =prompt='s =source=s.

Non-exhaustive list of features: