annotate-snippets-rs
annotate-snippets-rs copied to clipboard
Add InlineAnnotation
This is an experimental concept to annotate source inline on top of annotating it below.
This is an experiment in extending the API to support inline annotations.
I'm not sure if it's worth it, but wanted to give it a try and got it to work!
Alternatively, I was thinking of extending SourceAnnotation to allow users to specify the display format - under, inline or both, but that made the API a bit less readable IMO.
All I had to add to the examples/format.rs is:
@CAD97, @wycats, @brendanzab - thoughts?
I think it may be a path forward to allow for source coloring, if we enable custom "styles" and allow for such annotations. Not sure if it's the best way, but it's an option.
My primary goal is to visually aid analyzing the slice, not syntax coloring.