            (throw (ex-info "Hey" {})))))))
 
 (defn connection-count [figwheel-server build-id]
-  (when-let [res (get (server/connection-data figwheel-server)
-                      build-id)]
-    res))
+  (get (server/connection-data figwheel-server) build-id))
+
+(defn prompt-fn [figwheel-server build-id]
+  (if (in-nrepl-env?)
+    #(when-let [c (connection-count figwheel-server build-id)]
+       (when (> c 1)
+         (with-color-when (-> figwheel-server :ansi-color-output)
+           (println
+            (color
+             (str "v------- " build-id "!{:conn " c "} -------")
+             :magenta)))))
+    #(print
+      (str
+       (when build-id (str build-id ":"))
+       ana/*cljs-ns*
+       (when-let [c (connection-count figwheel-server build-id)]
+         (when (< 1 c) (str "!{:conn " c "}")))
+       "=> "))))
 
 (defn cljs-repl-env
   ([build figwheel-server]

  ([build figwheel-server opts]
   (let [opts (merge (assoc (or (:compiler build) (:build-options build))
                            :warn-on-undeclared true
                            :prompt (fn []
                                      (let [c (connection-count figwheel-server
                                                                (:id build))]
                                        (print (str
                                                (when (:id build) (str (:id build) ":"))
                                                ana/*cljs-ns*
                                                (when (and c (< 1 c))
                                                  (str "!{:conn " c "}"))
                                                "=> "))))
                            :eval #'catch-warnings-and-exceptions-eval-cljs)
                     opts)
         figwheel-server (assoc figwheel-server

(ns figwheel-sidecar.repl
  (:require
   [figwheel-sidecar.cljs-utils.exception-parsing :as cljs-ex]
   [strictly-specking-standalone.ansi-util :refer [with-color-when color]]   
   [cljs.repl]
   [cljs.stacktrace]
   [cljs.analyzer :as ana]   
