Skip to content

Commit

Permalink
Fix joaotavora#488: fix type error in eglot--xref-make-match
Browse files Browse the repository at this point in the history
Its first argument is passed to xref-make-match, which expects a string
as its SUMMARY argument, but symbol-at-point returns a symbol.

Co-authored-by: João Távora <joaotavora@gmail.com>

* eglot.el (eglot--lsp-xrefs-for-method): use symbol-name.
  • Loading branch information
phst authored May 25, 2020
1 parent 1cfcef4 commit b0bfbfb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,8 @@ Try to visit the target file for a richer summary line."
(eglot--collecting-xrefs (collect)
(mapc
(eglot--lambda ((Location) uri range)
(collect (eglot--xref-make-match (symbol-at-point) uri range)))
(collect (eglot--xref-make-match (symbol-name (symbol-at-point))
uri range)))
(if (vectorp response) response (list response))))))

(cl-defun eglot--lsp-xref-helper (method &key extra-params capability )
Expand Down

0 comments on commit b0bfbfb

Please sign in to comment.