Skip to content

Commit

Permalink
[ultra] Add support for Whidbey/Puget options
Browse files Browse the repository at this point in the history
This commit resolves #40

It allows a user to add whidbey/puget options in Ultra's `:repl` key,
which will be merged into the whidbey.printer/printer options map.
  • Loading branch information
venantius committed Nov 7, 2015
1 parent dc80790 commit d15e6f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/ultra/colorscheme.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
(alter-var-root
#'whidbey.repl/printer
merge
(assoc opts :color-scheme color-scheme))
{:color-scheme color-scheme})
(set-pretty-colors color-scheme)))
18 changes: 0 additions & 18 deletions src/ultra/printer/escape_hatch.clj

This file was deleted.

5 changes: 3 additions & 2 deletions src/ultra/repl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
[clojure.tools.nrepl.server]
[glow.core :as glow]
[io.aviso.repl :as pretty-repl]
[ultra.printer :refer [cprint]]
[ultra.printer.escape-hatch]))
[ultra.printer :refer [cprint]]))

(defmacro source
"Prints the source code for the given symbol, if it can find it.
Expand Down Expand Up @@ -57,7 +56,9 @@
[repl stacktraces]
(when (not (false? repl))
(require 'ultra.repl.whidbey)
(require 'whidbey.repl)
(eval '(ultra.repl.whidbey/add-whidbey-middleware))
(eval `(whidbey.repl/update-options! ~repl))
(replace-source))
(when (not (false? stacktraces))
(add-pretty-middleware)))
1 change: 0 additions & 1 deletion src/ultra/test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(:require [clojure.data :as data]
[clojure.pprint :as pp]
[puget.color.ansi :as ansi]
[puget.printer :as printer]
[ultra.test.diff :as diff]))


Expand Down

0 comments on commit d15e6f6

Please sign in to comment.