Skip to main content

Module label

Module label 

Source
Expand description

Label definitions and reference uses — the data of the per-file label/reference model: Vec-stored records addressed by newtype ids.

Structs§

CitationRef
A citation use site — one per key. A \cite{a,b} produces two CitationRefs. Citations are always cross-file: cite keys live in .bib files, so there is no in-file resolution (no resolved flag); the undefined-citation lint resolves them against the project’s bibliography via project::citations::ResolvedCitations (in the badness crate).
ColorDef
A color-name definition site (\definecolor{name}{model}{spec}, \colorlet{name}{base}, …). The definition-side analog of LabelDef, collected so color-name completion can offer document-defined colors alongside the built-in list; the reference side (\textcolor{name}{…}) is classified directly off the CST by completion and carries no stored record.
GlossaryDef
A glossary/acronym key definition site (\newglossaryentry{key}{…}, \newacronym[opts]{key}{short}{long}, …). The definition-side analog of LabelDef; the reference side (\gls{key}) is classified directly off the CST by completion and carries no stored model record yet.
LabelDef
A label definition site: either \label{key} or a curated environment’s label=key option.
LabelId
Index of a LabelDef in SemanticModel::labels.
LabelRef
A reference use site — one per key. A \cref{a,b,c} produces three LabelRefs, each carrying the same command kind and command range.
RefId
Index of a LabelRef in SemanticModel::refs.

Enums§

ColorDefKind
Which definer command produced a ColorDef. Kept distinct so a later hover/goto-def pass can render the definition appropriately (\definecolor carries a model + spec; \colorlet aliases an existing color).
GlossaryDefKind
Which definer command produced a GlossaryDef. Kept distinct so a later hover/goto-def pass can render the entry appropriately (an acronym has short/long groups; an entry has a key=value settings group).
RefCommand
Which reference-family command produced a LabelRef. A small explicit table (the analog of project::IncludeKind) kept distinct so later passes can honor differences (\cref capitalization, \nameref text, …).