typst_ide

Function definition

source
pub fn definition(
    world: &dyn World,
    document: Option<&Document>,
    source: &Source,
    cursor: usize,
    side: Side,
) -> Option<Definition>
Expand description

Find the definition of the item under the cursor.

Passing a document (from a previous compilation) is optional, but enhances the definition search. Label definitions, for instance, are only generated when the document is available.