• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.vscode/H03-May-2022-2626

images/H03-May-2022-

src/H03-May-2022-770672

syntaxes/H03-May-2022-682682

.gitignoreH A D29-Nov-197319 32

.vscodeignoreH A D29-Nov-197366 54

CHANGELOG.mdH A D29-Nov-1973487 3418

README.mdH A D29-Nov-19731.6 KiB4326

language-configuration.jsonH A D29-Nov-1973542 2727

package.jsonH A D29-Nov-19735.9 KiB205205

tsconfig.jsonH A D29-Nov-1973720 2323

yarn.lockH A D29-Nov-197312.5 KiB313265

README.md

1# insta snapshots
2
3This extension lets you better work with Rust's [insta snapshot](https://crates.io/crates/insta)
4files.  It adds syntax highlighting and other improvements.
5
6## Features
7
8The following features are currently available.
9
10### Jump to Definition
11
12After loading the extension you can "jump to definition" by hitting "F12" on
13a snapshot assertion macro:
14
15![jump to definition](https://raw.githubusercontent.com/mitsuhiko/insta/master/vscode-insta/images/jump-to-definition.gif)
16
17### Pending Snapshots View
18
19All pending snapshots are show in the sidebar if insta is used in your project:
20
21![sidebar](https://raw.githubusercontent.com/mitsuhiko/insta/master/vscode-insta/images/view.png)
22
23Clicking on a snapshot opens a diff view where you can accept and reject the
24snapshot.  This also works for inline snapshots.  Additionally you can instruct
25cargo insta to accept or reject all snapshots in one go.
26
27### Accepting / Rejecting
28
29Snapshots can be diffed, accepted and rejected right from within vscode.  This is available
30through the following commands:
31
32* "Compare Snapshots": opens a comparison view, also from the tree view.
33* "Switch Between Snapshots": switches between current and new snapshot.
34* "Accept New Snapshot": moves the new snapshot over the old snapshot.
35* "Reject New Snapshot": rejects (deletes) the new snapshot.
36
37### Syntax Highlighting
38
39For all insta `.snap` snapshots from insta syntax highlighting is provided as if they are YAML files.  For RON snapshots some small
40tweaks are applied to make them more pleasing to the eyes:
41
42![example screenshot](https://raw.githubusercontent.com/mitsuhiko/insta/master/vscode-insta/images/screenshot.png)
43