emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding support for xref jumping to headers/interfaces


From: Felician Nemeth
Subject: Re: Adding support for xref jumping to headers/interfaces
Date: Mon, 06 Mar 2023 13:22:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Can you, please, consider adding more than just one new xref command?
The Language Server Protocol defines jump-to-declaration,
jump-to-implementation, and jump-to-typeDefinition commands as well.

----

I can image a new xref-find-extra command that provides a
`tmm-menubar'-like single key selection for the specific jump type.  The
list of jump-types could be filled up by Eglot or major-modes (ada-mode
would add "specifications", ocaml-mode would add "interface").  If C-M-?
is bound to this new xref-find-extra, then "C-M-? i" would jump to the
interface definition in ada-mode, and "C-M-? d" would ask the LSP server
for declarations in case of Eglot.

(Users who find "C-M-?" awkward can rebind xref-find-extra to "s-.")

What do you think?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]