           (println " timeout !")
           (swap! timed-out-safe-connections update-in [safe-connection] (fnil inc 0)))))))
 
-(defn send-code
-  "Sends code and keep tracks of safe-connections that have timeouts.
-   When a safe-connection has had 2 timeouts, stop trying to use
-   it and return nil."
-  [safe-connection code timeout]
-  (send-message safe-connection {"op" "eval", "code" code} timeout))
-
 (defmulti find-var-metadata
   (fn [current-namespace ^IClojureEditor editor var]
     (when-let [repl (.getCorrespondingREPL editor)]

                                "(clojure.core/the-ns '%s) '%s))")
                       current-namespace
                       var)
          response (first (send-code safe-connection code 1000))]
      response)))

(defmethod find-var-metadata "info"

                (str " - " type))
            filter
            (context-info-data completion (+ prefix-offset (count completion)) metadata)
            (delay (doc/var-doc-info-html (find-var-metadata current-namespace editor completion))))))))) ;; todo remove metadata

(def activation-characters
  "Characters which will trigger auto-completion"
