                        doc line file] 
                 :as metadata} :metadata
                } suggestions]
-          (completion-proposal
-            completion
-            prefix-offset
-            (- offset prefix-offset)
-            (count completion)
-            nil
-            (cond-> completion
-              (and ns (not (.startsWith completion (str ns "/"))))
-                (str " (" ns ")")
-              type
-                (str " - " type))
-            filter
-            (context-info-data completion (+ prefix-offset (count completion)) metadata)
-            (delay (doc/var-doc-info-html (find-var-metadata current-namespace repl completion))))))))) ;; todo remove metadata
+          (let [md-ref (delay (find-var-metadata current-namespace repl completion))]
+            (completion-proposal
+              completion
+              prefix-offset
+              (- offset prefix-offset)
+              (count completion)
+              nil
+              (cond-> completion
+                (and ns (not (.startsWith completion (str ns "/"))))
+                  (str " (" ns ")")
+                type
+                  (str " - " type))
+              filter
+              (delay (context-info-data
+                       completion
+                       (+ prefix-offset (count completion))
+                       @md-ref))
+              (delay (doc/var-doc-info-html @md-ref)))))))))
 
 (def activation-characters
   "Characters which will trigger auto-completion"

       (getContextInformationPosition [this] position-start))
     {:start position-start
      :stop  position-stop}))

(defn complete-command
  "Create the complete command to be sent remotely to get back a list of

(def completion-limit 
  "Maximum number of returned results" 50)

(defn context-information
  [context-display-string
   image
