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
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.
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 other essential parts easily, such as file names and line numbers.
30
30
31
-
## Pretty and nREPL
31
+
### Enabling Pretty
32
+
33
+
Pretty exceptions are enabled by invoking the fucntion `clj-commons.pretty.repl/install-pretty-exceptions`. This
34
+
redefines a number of Vars to replace the default implementations with prettier ones. This is something you could
35
+
set up in your `user.clj` namespace.
36
+
37
+
### Pretty with Leiningen
38
+
39
+
In shared projects, many people have different ideas about what's best when it comes to error reporting.
40
+
If you want to be able to use Pretty but have your project's dependencies be "clean", you can use
41
+
a [Leiningen](https://leiningen.org/) profile for this purpose.
42
+
43
+
For example, create a file `~/.lein/profiles.d/debug.clj`:
44
+
45
+
```clojure
46
+
{:dependencies
47
+
[[org.clj-commons/pretty "3.4.1"]]
48
+
:injections
49
+
[(require '[clj-commons.pretty.repl :as repl])
50
+
(repl/install-pretty-exceptions)]}
51
+
```
52
+
You can then run your REPL as `lein with-profiles +debug` and have your pretty
53
+
exceptions without adding pretty-specific code or dependencies to your project.
54
+
55
+
TIP: I also set up other tools I depend on, such as
56
+
[clj-reload](https://github.com/tonsky/clj-reload), in the same profile.
0 commit comments