[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding support for xref jumping to headers/interfaces
From: |
João Távora |
Subject: |
Re: Adding support for xref jumping to headers/interfaces |
Date: |
Sat, 11 Nov 2023 11:22:21 +0000 |
On Sat, Nov 11, 2023 at 1:08 AM Dmitry Gutov <dmitry@gutov.dev> wrote:
>
> On 09/11/2023 22:44, João Távora wrote:
> > On Thu, Nov 9, 2023 at 7:23 PM Spencer Baugh<sbaugh@janestreet.com> wrote:
> >> João Távora<joaotavora@gmail.com> writes:
> >>> On Wed, Nov 8, 2023 at 11:34 PM Dmitry Gutov<dgutov@yandex.ru> wrote:
> >>>>> But neither was available at the time, so I did those commands and they
> >>>>> won't
> >>>>> be obsoleted any time soon.
> >>>> Reasons being..?
> >>> That we can't come up with alternatives to exactly that interface,
> >>> obviously. When you do, I'll obsolete them. But do you want to hardcode
> >>> things like LSP "typeDefinition" and Sly's "who-macroexpands" somewhere
> >>> in xref.el? How would that work?
> >> Right, so if we have kinds defined in the core for "declaration",
> >> "implementation", and "type-definition" (maybe not with those exact
> >> names), then we can have xref-find-declaration,
> >> xref-find-implementation, and xref-find-type-definition (again maybe not
> >> with those exact names), and just do
> >>
> >> (define-obsolete-function-alias 'eglot-find-declaration
> >> 'xref-find-declaration)
> >> (define-obsolete-function-alias 'eglot-find-implementation
> >> 'xref-find-implementation)
> >> (define-obsolete-function-alias 'eglot-find-typeDefinition
> >> 'xref-find-type-definition)
> >>
> >> Is that possible?
> > For Dmitry to answer
>
> FWIW, the above is one of the alternatives that I had in mind when I
> mentioned obsoleting the said commands.
>
> The other alternative looked like this, though:
>
> (make-obsolete 'eglot-find-declaration "use `xref-find-extra'" "...")
> (make-obsolete 'eglot-find-implementation "use `xref-find-extra'" "...")
> (make-obsolete 'eglot-find-typeDefinition "use `xref-find-extra'" "...")
No, I'm not obsoleting those commands, sorry. Not least because
new LSP things may come along that xref.el won't be able to respond
in time with. So those commands are staying there.
The "declaration/implementation/typeDefinition" triplet is an LSP
invention and Eglot is for LSP, so eglot- commands they will be,
even if sometimes later in an eglot-commands.el file along with
other ones. And that's even if we do import that LSP invention
into xref (which I think we shouldn't -- see my reply to Spencer).
João
- Re: Adding support for xref jumping to headers/interfaces, (continued)
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/12
- Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/12
- electric-pair-mode vs paredit, was: Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/12
- Re: electric-pair-mode vs paredit, was: Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/12
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/10
- Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/11
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/11
- Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/12
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/12
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/10
- Re: Adding support for xref jumping to headers/interfaces,
João Távora <=
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/11
- Re: Adding support for xref jumping to headers/interfaces, Spencer Baugh, 2023/11/08
- Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/08
- Re: Adding support for xref jumping to headers/interfaces, Spencer Baugh, 2023/11/08
- Re: Adding support for xref jumping to headers/interfaces, João Távora, 2023/11/08
- CCing thread participants through gnus+gmane, Spencer Baugh, 2023/11/09
- Re: CCing thread participants through gnus+gmane, Eric Abrahamsen, 2023/11/10
- Re: CCing thread participants through gnus+gmane, Visuwesh, 2023/11/10
- Re: Adding support for xref jumping to headers/interfaces, Spencer Baugh, 2023/11/09
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/10