Skip to content

CompletionContext

🛈 DocStrings

What is being completed: the token before the cursor and where it starts.

Source code in src/acptui/completion.py
@dataclass(frozen=True)
class CompletionContext:
    """What is being completed: the token before the cursor and where it starts."""

    kind: CompletionKind
    token: str
    """The text typed so far (without the ``/`` or ``@``)."""

    start: int
    """Column of the token start (after the ``/`` or ``@``) in the cursor line."""

start instance-attribute

start: int

Column of the token start (after the / or @) in the cursor line.

token instance-attribute

token: str

The text typed so far (without the / or @).

:fa-brands-github: Show source on GitHub