Skip to main content

Module completion

Module completion 

Source
Expand description

Context-aware completion for Lex documents.

Provides intelligent completion suggestions based on cursor position:

  • Reference context: Inside [...] brackets, offers annotation labels, definition subjects, session identifiers, and file paths found in the document.

  • Verbatim label context: At a verbatim block’s closing label, offers standard labels (doc.image, doc.code, etc.) and common programming languages.

  • Verbatim src context: Inside a src= parameter, offers file paths referenced elsewhere in the document.

The completion provider is document-scoped: it only suggests items that exist in the current document. For cross-document completion (e.g., bibliography entries), the LSP layer would need to aggregate from multiple sources.

Structs§

CompletionCandidate
A completion suggestion with display metadata.
CompletionWorkspace
File-system context for completion requests.

Functions§

completion_items
Returns completion candidates appropriate for the cursor position.