summaryrefslogtreecommitdiff
path: root/cider-eldoc.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2016-04-03 12:08:28 +0300
committerBozhidar Batsov <bozhidar@batsov.com>2016-04-03 12:08:28 +0300
commit13dd5dd4a62bdb3c8b51764b89db9d94a7544bec (patch)
tree53960b684a930b53c967a2aae2dc6ace212bf654 /cider-eldoc.el
parentaf5ac96b4d2aa9987fd746a79f1211c19eff0837 (diff)
Add a note about eldoc caching
Diffstat (limited to 'cider-eldoc.el')
-rw-r--r--cider-eldoc.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/cider-eldoc.el b/cider-eldoc.el
index 746dae60..9775e612 100644
--- a/cider-eldoc.el
+++ b/cider-eldoc.el
@@ -166,6 +166,9 @@ if the maximum number of sexps to skip is exceeded."
(cdr cider-eldoc-last-symbol)
(when-let ((eldoc-info (cider-sync-request:eldoc thing)))
(let ((arglist (nrepl-dict-get eldoc-info "eldoc")))
+ ;; middleware eldoc lookups are expensive, so we
+ ;; cache the last lookup. This eliminates the need
+ ;; for extra middleware requests within the same sexp.
(setq cider-eldoc-last-symbol (cons thing arglist))
arglist)))))))