Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

Commit afe6626

Browse files
committed
Add info about peek results
1 parent 92dfea9 commit afe6626

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

docs/eval-tips.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ Calva has commands for evaluating the **current form** and the **current top-lev
1212

1313
You can also choose what should happen with the results:
1414

15-
1. **Inline.** This will display the results (or some of it, if it is long) inline in the editor. _You find the full results in the hover of the eveluated form_, from where it is easy to copy it to the clipboard. (The results will also get printed to the **Calva says** output channel.)
15+
1. **Inline.** This will display the results (or some of it, if it is long) inline in the editor. _You find the full results in the [output window](output.md)_, from where it is easy to copy it to the clipboard.
1616
1. **To comments.** This will add the results as comment lines below the current line.
1717
1. **Replace the evaluated code.** This will do what it says, the evaluated code will be replaced with its results.
18-
1. **Send to REPL window.** You can also send the current form, or current top-level form, to the REPL window for evaluation. This is currently the only way to get a readable and clickable stack trace in cases where evaluation results in such errors.
1918

2019
## Wait, Current Form? Top-level Form?
2120

1.84 MB
Loading

docs/output.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ then evaluate it using `alt+enter`, you'll get:
3636

3737
This, since the namespace ”followed” the first evaluation over to the output window.
3838

39+
## Peek at Results
40+
41+
On smaller screens (or just depending on your taste) you might not have the output window visible side-by-side with your code, but rather in a tab in the same editor group.
42+
43+
Then your immediate feedback will be the inline display, which is limited to the first line of the results. All is not lost, however, you can peek at the full results using VS Code's command **Peek Definition**. Calva adds a definition pointer ”in” to the evaluated code in the output window.
44+
45+
![Peek at results](images/howto/output/peek-last-result.gif)
46+
47+
(On Mac the default keyboard shortcut for the peek command is `alt+f12`.)
48+
49+
In the demo gif we utilize two things about this peek widgets:
50+
51+
1. It stays open until you close it. So you can keep evaluate different versions of your form and see the results get printed.
52+
2. The widget displays a ”full” Calva editor, so you can use Paredit to conveniently select forms.
53+
3954
## Stacktraces
4055

4156
When an evaluation produces an error, the output window will automatically print the stacktrace (when available). It will be printed as an EDN structure. And when source locations are available you will be able to navigate to them by `command+click` (Mac) or `ctrl+click` (Windows and Linux).

0 commit comments

Comments
 (0)