]> git.eshelyaron.com Git - emacs.git/commit
Eglot: use new xref-find-extra feature of Xref feature/xref-find-extra
authorJoão Távora <joaotavora@gmail.com>
Sun, 5 Nov 2023 11:01:49 +0000 (11:01 +0000)
committerJoão Távora <joaotavora@gmail.com>
Mon, 6 Nov 2023 00:01:56 +0000 (00:01 +0000)
commit39c8be6eb760d45105650cb8c3198cd51cb3fdda
treeeb3511f5d150738e60cd6011e0572946ef3b869c
parent29c903393757733442a0fb575fe4190289334a57
Eglot: use new xref-find-extra feature of Xref

This removes the need of some Eglot hacks to implement the commands
eglot-find-declaration, eglot-find-implementation, and
eglot-find-typeDefinition.

It also allows the new command xref-find-extra to find different kinds
of definitions.

* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): New variable.
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Use xref-find-extra.
(xref-backend-definitions): Minor tweak.
(xref-backend-references): Don't use eglot--lsp-xref-refs.
(eglot--lsp-xref-helper): Delete this helper.
(eglot--lsp-xref-refs): Delete this variable.
(xref-backend-extra-kinds, xref-backend-extra-defs): New implementation.
lisp/progmodes/eglot.el