{"id":20780748,"url":"https://github.com/greglook/whidbey","last_synced_at":"2025-04-04T20:11:38.658Z","repository":{"id":16843321,"uuid":"19603072","full_name":"greglook/whidbey","owner":"greglook","description":"nREPL middleware to pretty-print colored values","archived":false,"fork":false,"pushed_at":"2023-01-07T21:27:45.000Z","size":145,"stargazers_count":158,"open_issues_count":0,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-28T19:08:04.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greglook.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-09T07:33:56.000Z","updated_at":"2023-12-27T07:45:11.000Z","dependencies_parsed_at":"2023-01-13T19:03:02.173Z","dependency_job_id":null,"html_url":"https://github.com/greglook/whidbey","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greglook%2Fwhidbey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greglook%2Fwhidbey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greglook%2Fwhidbey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greglook%2Fwhidbey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greglook","download_url":"https://codeload.github.com/greglook/whidbey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T13:39:02.193Z","updated_at":"2025-04-04T20:11:38.606Z","avatar_url":"https://github.com/greglook.png","language":"Clojure","funding_links":[],"categories":["Lein"],"sub_categories":[],"readme":"whidbey\n=======\n\n[![Build Status](https://circleci.com/gh/greglook/whidbey.svg?style=shield\u0026circle-token=28b1a3241663836937ffb5df9a451e5727625c65)](https://circleci.com/gh/greglook/whidbey)\n[![cljdoc](https://cljdoc.org/badge/mvxcvi/whidbey)](https://cljdoc.org/d/mvxcvi/whidbey/CURRENT)\n\nThis is a plugin for [Leiningen](http://leiningen.org/) which changes the REPL\nto pretty-print results with [Puget](https://github.com/greglook/puget).\n\n![repl demo](demo.gif)\n\nInternally, Whidbey integrates with the [nREPL](https://github.com/nrepl/nrepl)\n`pr-values` middleware to provide a custom pretty-printer for the results of\nevaluated forms in the REPL. See the [history doc](HISTORY.md) for more on the\nmotivations and implementation details behind this project.\n\n\n## Usage\n\nTo use Whidbey, add it to the `:plugins` vector in your `user` or `system`\nprofile. Note that this requires Leiningen version 2.8.2 or higher for the\nnecessary nREPL and plugin functionality.\n\n[![Clojars Project](http://clojars.org/mvxcvi/whidbey/latest-version.svg)](http://clojars.org/mvxcvi/whidbey)\n\nSince Leiningen has deprecated implicit plugin middleware, you'll need to\nactivate it by ading the following to your profile as well:\n\n```clojure\n:middleware [whidbey.plugin/repl-pprint]\n```\n\n### Configuration\n\nWhidbey passes rendering options into Puget from the `:whidbey` key in the\nprofile map:\n\n```clojure\n:whidbey {:width 180\n          :map-delimiter \"\"\n          :extend-notation true\n          :print-meta true\n          :color-scheme {:delimiter [:blue]\n                         :tag [:bold :red]\n                         ...}\n          ...}\n```\n\nSee the [`puget.printer`](https://cljdoc.org/d/mvxcvi/puget/CURRENT/api/puget.printer)\nnamespace for the available configuration.\n\nIf you feel like adjusting Whidbey's configuration at runtime, you can use the\n`whidbey.repl/update-options!` function. This will affect all subsequent\nmessages rendered.\n\nIf you need to further customize the responses from the REPL, Whidbey respects\nany `:print-options` set on the `:op :eval` message. These will be merged into\nthe normal rendering configuration, but will not affect subsequent messages.\n\n### Tag Extensions\n\nWhidbey adds some convenience tagged-literal extensions for binary data and\nURIs. The extensions update the `default-data-readers` var to support\nround-tripping the tagged representations:\n\n```clojure\n=\u003e (java.net.URI. \"http://github.com/greglook\")\n#whidbey/uri \"http://github.com/greglook\"\n\n=\u003e (.getBytes \"foo bar baz\")\n#whidbey/bin \"Zm9vIGJhciBiYXo=\"\n\n=\u003e #whidbey/bin \"b25lIG1vcmUgdGltZSwgbXVzaWNzIGdvdCBtZSBmZWVsaW5nIHNvIGZyZWU=\"\n#whidbey/bin \"b25lIG1vcmUgdGltZSwgbXVzaWNzIGdvdCBtZSBmZWVsaW5nIHNvIGZyZWU=\"\n```\n\nThis is controlled by the `:extend-notation` option. Other type extensions can\nbe added by providing a `:tag-types` map. This should map type symbols to a map\nwith a tag symbol key pointing to a formatting function. When the type is\nencountered, it will be rendered as a tagged literal with a form from calling\nthe formatter on the value.\n\nFor example, to render class values as tagged types, you can add this to your\n`:whidbey` config:\n\n```clojure\n:tag-types\n{java.lang.Class {'java/class #(symbol (.getName %))}}}\n```\n\nIf the type name or the formatter function are not available at load time, you\ncan quote them to suppress evaluation until those types are printed.\n\n### Troubleshooting\n\nSometimes, there are types which Puget has trouble rendering. These can be\nexcluded from pretty-printing by adding their symbol to the `:escape-types` set\nin the options. These types will be rendered with the normal Clojure printer.\nIf you want to use these types' `print-method` instead, set the\n`:print-fallback` option to `:print`:\n\n```clojure\n:whidbey {:print-fallback :print\n          :escape-types #{'datomic.db.Db 'datomic.btset.BTSet ...}\n          ...}\n```\n\nWhidbey may also conflict with other REPL customizations. If you experience\nerrors, you can check how the profiles are being merged using the lein-pprint or\n[lein-cprint](https://github.com/greglook/lein-cprint) plugins:\n\n```bash\n$ lein with-profile +whidbey/repl cprint :repl-options\n```\n\n\n## License\n\nThis is free and unencumbered software released into the public domain.\nSee the UNLICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreglook%2Fwhidbey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreglook%2Fwhidbey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreglook%2Fwhidbey/lists"}