Expand description
Annotation navigation and resolution editing.
This module provides editor-oriented utilities for working with annotations:
-
Navigation: Jump between annotations in document order with circular wrapping. Useful for implementing “next annotation” / “previous annotation” commands.
-
Resolution: Toggle the
status=resolvedparameter on annotations, enabling review workflows where annotations mark items needing attention.
All functions are stateless and operate on the parsed document AST. They return enough information for editors to apply changes (ranges, text edits) without needing to understand the Lex format internals.
Structs§
- Annotation
Edit - A text edit that modifies an annotation’s header.
- Annotation
Navigation Result - Result of navigating to an annotation.
Enums§
- Annotation
Direction - Direction for annotation navigation.
Functions§
- navigate
- Navigates to an annotation in the specified direction.
- next_
annotation - Finds the next annotation after the current position, wrapping to the first if needed.
- previous_
annotation - Finds the previous annotation before the current position, wrapping to the last if needed.
- resolution_
edit - Computes the edit needed to change an annotation’s resolution status.
- toggle_
annotation_ resolution - Toggles the resolution status of the annotation at the given position.