Module text_completion
Expand description
Inline completion in a text field: :shortcode offers the catalogue’s
emoji and @name offers the workspace’s people and agents, in the one list
beside the caret.
A field offers both by default; what it offers is a property of the field
(TextCompletion), not of the app. A search field, a secret, a code
editor or a URL is plain because : and @ are syntax there, not
because completion is unavailable.
Both triggers share one keyboard-driven list: Up and Down move the armed
row, Enter or Tab accepts it, Escape dismisses this token. Accepting
replaces the token with the emoji character (a workspace emoji stays
written :name:) or with the mention’s name as it will resolve. A field
with an input method composition open offers nothing, so completion never
competes with the input method for the same keys.
Structs§
- Emoji
Query - The
:shortcodethe caret sits in. - Text
Completion - Which parts of a text field’s inline completion it offers.
Functions§
- emoji_
query_ at_ caret - The
:shortcodeending atcaret, if the caret sits in one: a:that opens a token, followed by at mostMAX_SHORTCODE_LENshortcode characters.Noneinside a word (10:30,a:smile) and for a token that already has its closing:after the typed part.