]> git.eshelyaron.com Git - emacs.git/commit
Be more conservative with the lsp identifier guess
authorJoão Távora <joaotavora@gmail.com>
Fri, 15 Jul 2022 11:58:47 +0000 (12:58 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 15 Jul 2022 11:58:47 +0000 (12:58 +0100)
commit6717589c57edb96c7050df7d33cfcdc805a0eaec
tree1546289b19b127ca952d2e9fe82c4d19d80d7e27
parentb931d93b1549d41eb11a61724e339a4a34b317d3
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.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/131
GitHub-reference: per https://github.com/joaotavora/eglot/issues/314
lisp/progmodes/eglot.el