[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 260f152 65/69: Fix #321: don't choke on single-lo
From: |
João Távora |
Subject: |
[elpa] externals/eglot 260f152 65/69: Fix #321: don't choke on single-location reply to tD/definition |
Date: |
Sun, 20 Oct 2019 08:21:54 -0400 (EDT) |
branch: externals/eglot
commit 260f152634df2ba84ef3e51bdfd4f90a20babd9b
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #321: don't choke on single-location reply to tD/definition
* eglot.el (eglot--lsp-xrefs-for-method): Accept non-vector
Location.
---
eglot.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/eglot.el b/eglot.el
index bb5d5f8..aa64fe6 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1791,14 +1791,15 @@ Try to visit the target file for a richer summary line."
(cadr (split-string (symbol-name method)
"/"))))))
(eglot--error "Sorry, this server doesn't do %s" method))
- (eglot--collecting-xrefs (collect)
- (mapc
- (eglot--lambda ((Location) uri range)
- (collect (eglot--xref-make (symbol-at-point) uri range)))
- (jsonrpc-request
- (eglot--current-server-or-lose) method (append
-
(eglot--TextDocumentPositionParams)
- extra-params)))))
+ (let ((response
+ (jsonrpc-request
+ (eglot--current-server-or-lose)
+ method (append (eglot--TextDocumentPositionParams) extra-params))))
+ (eglot--collecting-xrefs (collect)
+ (mapc
+ (eglot--lambda ((Location) uri range)
+ (collect (eglot--xref-make (symbol-at-point) uri range)))
+ (if (vectorp response) response (list response))))))
(cl-defun eglot--lsp-xref-helper (method &key extra-params capability )
"Helper for `eglot-find-declaration' & friends."
- [elpa] externals/eglot 06ff65d 52/69: Rework and correct major part of xref glue code, (continued)
- [elpa] externals/eglot 06ff65d 52/69: Rework and correct major part of xref glue code, João Távora, 2019/10/20
- [elpa] externals/eglot 9951dc5 62/69: Add a test for vscode-json-languageserver's completions, João Távora, 2019/10/20
- [elpa] externals/eglot 124a833 56/69: Add a test for #311 and #279, João Távora, 2019/10/20
- [elpa] externals/eglot d774754 37/69: Merge pull request #298 from jorams/nil-capabilities-as-false, João Távora, 2019/10/20
- [elpa] externals/eglot 20195e5 42/69: On buffer kill, first send didClose then teardown local structures, João Távora, 2019/10/20
- [elpa] externals/eglot 5a98c5a 55/69: Fix eglot-completion-at-point to work with bare completion-at-point, João Távora, 2019/10/20
- [elpa] externals/eglot 6a7ce66 32/69: Expand directory watcher globs containing ** (#293), João Távora, 2019/10/20
- [elpa] externals/eglot f45fdc6 31/69: Fix invalid guess for php language Server (#288), João Távora, 2019/10/20
- [elpa] externals/eglot 05c68c2 45/69: Don't send dummy JSON object in "initialized" notification (#312), João Távora, 2019/10/20
- [elpa] externals/eglot bff921e 60/69: Per #319: always filter completions client-side by prefix, João Távora, 2019/10/20
- [elpa] externals/eglot 260f152 65/69: Fix #321: don't choke on single-location reply to tD/definition,
João Távora <=
- [elpa] externals/eglot 8a17c29 61/69: Close #235: play along with LSP's filterText hacks, João Távora, 2019/10/20
- [elpa] externals/eglot f5151be 67/69: Don't immediately request completions in eglot-completion-at-point, João Távora, 2019/10/20
- [elpa] externals/eglot 74240c7 66/69: Protect against zero-length completions, João Távora, 2019/10/20