verso icon indicating copy to clipboard operation
verso copied to clipboard

Feature requests

Open shreevatsa opened this issue 1 year ago • 1 comments

Thank you for this tool! It is a great idea and very elegantly executed: I love how minimal and clean the design is; it's really a joy to use, and my code is really improving as a result. Moreover, with this design, I imagine that it will be easy to extend to cover different use-cases.

Just jotting down here a couple of things I felt would be nice, so that I don't forget them (none are really necessary; the tool is fine without them):

  1. It may be nice for the error messages, like

    Error: (src/lib.rs:1212:7) DoubleOpen found a fragment open symbol while a fragment is already opened: 1212
    

    and

    Error: (src/lib.rs:1767:3) CloseBeforeOpen found a fragment close symbol when no fragment is active: 1767
    

    to mention the names (found foo open while bar was already opened, or found close for foo…). But the line numbers are enough for now.

  2. This won't be wanted in most cases, but to make sure I've covered everything, it may be nice for verso to show all the lines that are not covered by any fragment (or put them in automatically generated everything_else fragment(s) — this will mostly be blank lines and a few comments), and similarly for recto to report all the fragments that were defined but weren't referenced.

    Edit: And just to echo my point about how good the design is: I am already able to achieve the latter with

    for i in $(verso src/lib.rs src/bin.rs | jq -r '.[].id'); do grep -q @@$i docs-src/about.md || echo "$i"; done
    

shreevatsa avatar Aug 22 '23 13:08 shreevatsa

Thanks for the kind words! I'm happy you're finding verso useful, and these are very reasonable suggestions.

I'm not actively working on this project at the moment so it may be a bit before I get around to implementing either of these. If you want to take a stab at it I'd be happy to review a patch as well.

nickpascucci avatar Aug 22 '23 16:08 nickpascucci