This extension lets you better work with Rust's insta snapshot files. It adds syntax highlighting and other improvements.
The following features are currently available.
After loading the extension you can "jump to definition" by hitting "F12" on a snapshot assertion macro:
All pending snapshots are show in the sidebar if insta is used in your project:
Clicking on a snapshot opens a diff view where you can accept and reject the snapshot. This also works for inline snapshots. Additionally you can instruct cargo insta to accept or reject all snapshots in one go.
Snapshots can be diffed, accepted and rejected right from within vscode. This is available through the following commands:
- "Compare Snapshots": opens a comparison view, also from the tree view.
- "Switch Between Snapshots": switches between current and new snapshot.
- "Accept New Snapshot": moves the new snapshot over the old snapshot.
- "Reject New Snapshot": rejects (deletes) the new snapshot.
For all insta .snap
snapshots from insta syntax highlighting is provided as if they are YAML files. For RON snapshots some small
tweaks are applied to make them more pleasing to the eyes: