Skip to content

Commit

Permalink
Update README with puget-options.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Jun 24, 2014
1 parent c8acc3e commit 2e6f3b8
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,32 @@ main motivation of this project), you can use the following in your `user` or
```clojure
:plugins
[[mvxcvi/whidbey "0.2.2"]]

; printing options are customizable:
:puget-options
{:width 180
:map-delimiter ","
:print-meta true
:color-scheme
{:delimiter [:blue]
:tag [:bold :red]
...}}
```

The plugin uses `:whidbey-renderer` if defined in the project, otherwise it uses
`cprint-str` from Puget.
See the Puget
[`*options*`](https://github.com/greglook/puget/blob/master/src/puget/printer.clj)
var for more possibilities.

### Troubleshooting

This may conflict with existing REPL customizations, so if necessary you can add
the profile configuration yourself:

```clojure
:repl
{:dependencies
[[mvxcvi/puget "0.5.2"]
[mvxcvi/whidbey "0.2.2"]]
[[mvxcvi/puget "RELEASE"]
[mvxcvi/whidbey "RELEASE"]]

:repl-options
{:init (require 'clojure.tools.nrepl.middleware.render-values 'puget.printer)
Expand All @@ -41,8 +54,9 @@ the profile configuration yourself:
```

If you have an `:init` key for `:repl-options` in another profile, you should
wrap it in a `(do ...)` so it merges correctly. You can check this using the
lein-pprint or [lein-cprint](https://github.com/greglook/lein-cprint) plugins:
wrap it in a vector or `(do ...)` so it merges correctly. You can check this
using the lein-pprint or [lein-cprint](https://github.com/greglook/lein-cprint)
plugins:

```bash
$ lein with-profile +repl cprint :repl-options
Expand Down

0 comments on commit 2e6f3b8

Please sign in to comment.