[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 25f6338741 04/15: Per #131: Tweak some details, f
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eglot 25f6338741 04/15: Per #131: Tweak some details, fix some bugs |
Date: |
Sun, 24 Jul 2022 14:57:34 -0400 (EDT) |
branch: externals/eglot
commit 25f6338741c04466591cf1ea1825b5f47f91bf0d
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Per #131: Tweak some details, fix some bugs
eglot--recover-workspace-symbol-meta had a bug that still made it
choke on improper lists.
Also, when simply M-. to the thing at point, let's not lose time on
iterating a potentially out-of-date eglot--workspace-symbols-cache.
So clear it early in the pre-command-hook.
* eglot.el (eglot--workspace-symbols-cache): Move up.
(eglot--pre-command-hook): Clear eglot--workspace-symbols-cache here.
(eglot--recover-workspace-symbol-meta): Check for consp.
---
eglot.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/eglot.el b/eglot.el
index 6d3667a84a..6f9c4f50f2 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2101,8 +2101,12 @@ THINGS are either registrations or unregisterations
(sic)."
:key #'seq-first))))
(eglot-format (point) nil last-input-event))))
+(defvar eglot--workspace-symbols-cache (make-hash-table :test #'equal)
+ "Cache of `workspace/Symbol' results used by `xref-find-definitions'.")
+
(defun eglot--pre-command-hook ()
"Reset some temporary variables."
+ (clrhash eglot--workspace-symbols-cache)
(setq eglot--last-inserted-char nil))
(defun eglot--CompletionParams ()
@@ -2392,9 +2396,6 @@ Try to visit the target file for a richer summary line."
(eglot--current-server-or-lose))
(xref-make-match summary (xref-make-file-location file line column)
length)))
-(defvar eglot--workspace-symbols-cache (make-hash-table :test #'equal)
- "Cache of `workspace/Symbol' results used by `xref-find-definitions'.")
-
(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql eglot)))
(if (eglot--server-capable :workspaceSymbolProvider)
(let ((buf (current-buffer)))
@@ -2446,10 +2447,10 @@ Try to visit the target file for a richer summary line."
"Search `eglot--workspace-symbols-cache' for rich entry of STRING."
(catch 'found
(maphash (lambda (_k v)
- (while v
+ (while (consp v)
;; Like mess? Ask minibuffer.el about improper lists.
(when (equal (car v) string) (throw 'found (car v)))
- (setq v (and (consp v) (cdr v)))))
+ (setq v (cdr v))))
eglot--workspace-symbols-cache)))
(add-to-list 'completion-category-overrides
- [elpa] externals/eglot updated (c558fd6a24 -> 6cc6fcc0fa), ELPA Syncer, 2022/07/24
- [elpa] externals/eglot ae7261c1fe 02/15: Per #131: Experiment with grouping in xref-backend-identifier-completion-table, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 25f6338741 04/15: Per #131: Tweak some details, fix some bugs,
ELPA Syncer <=
- [elpa] externals/eglot 6cc6fcc0fa 15/15: Merge commit 'c558fd6a24' to fix fallout of force-push in GNU ELPA, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 33c464f658 06/15: Per #131, #314: Be more conservative with the LSP identifier guess, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 29690e88e3 13/15: Always default eglot-strict-mode to nil, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 1db95974a7 07/15: Per #967: eglot-workspace-configuration can be a function, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 87e6de3cdf 08/15: Appease byte-compiler warnings about wrong use of quotes, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot a62a388021 11/15: Fix README.md typos and rework section about Workspace configuration, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot 2f71de72e3 01/15: Fix #131: Make C-u M-. work half decently, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot c64fe76e86 03/15: Per #131: Cosmetic decisions guaranteed to tick off someone somewhere (tm), ELPA Syncer, 2022/07/24
- [elpa] externals/eglot a2d9e18945 09/15: Reply more reasonably to server's workspace/applyEdit, ELPA Syncer, 2022/07/24
- [elpa] externals/eglot c962f6e5f6 12/15: Rework table of contents in README.md again, ELPA Syncer, 2022/07/24