You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-13Lines changed: 44 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,19 @@ Or, same thing, but with Pretty enabled:
28
28
29
29
The point is, you can scan down to see things in chronological order; the important parts are highlighted, the names are the same (or closer) to your source code, unnecessary details are omitted, and it's much easier to pick out the most important parts, such as file names and line numbers.
30
30
31
+
## Pretty and nREPL
32
+
33
+
[nREPL](https://nrepl.org) is the framework that allows an IDE such as [Emacs](https://cider.mx/)
34
+
or [Cursive](https://cursive-ide.com/), or even a CLI such as
35
+
[Leiningen](https://leiningen.org/), to interoperate with a running REPL in a subprocess.
36
+
37
+
Pretty includes an nREPL middleware function, `clj-commons.pretty.nrepl/wrap-pretty`, that will install pretty exception reporting into the REPL.
38
+
39
+
The nREPL documentation describes how to enable such middleware
40
+
inside [project.clj or deps.edn](https://nrepl.org/nrepl/usage/server.html#starting-a-server) or
41
+
in [.nrepl/nrepl.edn](https://nrepl.org/nrepl/usage/server.html#server-configuration) (for instance, when developing
42
+
with [Cursive](https://cursive-ide.com/userguide/repl.html#configuring-middleware-for-nrepl-repls))
43
+
31
44
## Beyond Exceptions
32
45
33
46
Pretty can print out a sequence of bytes; it includes color-coding inspired by
@@ -43,19 +56,22 @@ to indicate where the two sequences differ.
@@ -66,7 +82,22 @@ Pretty can output pretty tabular data:
66
82
=> nil
67
83
```
68
84
69
-
The `print-table` function has many options to easily adjust the output to your needs, including fonts, text alignment, and the table border.
85
+
The `print-table` function has many options to easily adjust the output to your needs, including fonts, text alignment, and line annotations. It also supplies several different table styles:
0 commit comments