[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 33c464f658 06/15: Per #131, #314: Be more conserv
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eglot 33c464f658 06/15: Per #131, #314: Be more conservative with the LSP identifier guess |
Date: |
Sun, 24 Jul 2022 14:57:34 -0400 (EDT) |
branch: externals/eglot
commit 33c464f658de70f36c27237d57b9c9858c68bc81
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Per #131, #314: Be more conservative with the LSP identifier guess
If the user is not requesting a prompt, opt for the safer approach
which is to get the location from textDocument/definition, not from
workspace/symbol. Because of things like function overloading, the
latter is not always successful in finding exactly the definition of
the thing one is invoking M-. on.
This requires using an xref-internal symbol, which is kind of
unfortunate.
* eglot.el (xref-backend-identifier-at-point): Rework.
---
eglot.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index 22eff41f53..0b64cd2301 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2458,10 +2458,11 @@ If BUFFER, switch to it before."
(cl-defmethod xref-backend-identifier-at-point ((_backend (eql eglot)))
(let ((attempt
- (puthash :default
- (ignore-errors
- (eglot--workspace-symbols (symbol-name (symbol-at-point))))
- eglot--workspace-symbols-cache)))
+ (and (xref--prompt-p this-command)
+ (puthash :default
+ (ignore-errors
+ (eglot--workspace-symbols (symbol-name
(symbol-at-point))))
+ eglot--workspace-symbols-cache))))
(if attempt (car attempt) "LSP identifier at point")))
(defvar eglot--lsp-xref-refs nil
- [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, 2022/07/24
- [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 <=
- [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
- [elpa] externals/eglot f62b641b5c 05/15: Per #131, #314: Guess the "LSP identifier at point", ELPA Syncer, 2022/07/24
- [elpa] externals/eglot eed9a65515 10/15: Fix embarrassing paren-matching blunder in eglot.el, ELPA Syncer, 2022/07/24