[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: |
Sun, 12 Nov 2023 02:08:13 +0000 |
On Sun, Nov 12, 2023 at 1:51 AM Dmitry Gutov <dmitry@gutov.dev> wrote:
> I thought we might have decided that the backend would create its own
> specific command for that (e.g. called
> eglot-find-higher-order-template-cxx-macroexpansion-definitions).
Noooo. Eglot only does LSP things! The major mode may do that if
it has another alternative backend, or if it knows it is using LSP
with a specific language server, like 'superduperclangdfork'. So it would be
c++-ts-mode-find-higher-order-template-cxx-macroexpansion-definitions
, never eglot-foo.
In my proposal, for your example, if the major mode knows LSP is being
used with 'superduperclangdfork' fetching xrefs _may_ be simplified using
some existing eglot.el helpers to be externalized later. If LSP is
not being used, the major mode uses whatever it knows to use from
its backend. The commands _should_ be defined by using xref.el
command-defining macros for a consistent interface to the command
(or defun+xref-show-refs for a potentially less consistent one).
Good grief, so many mails to answer and statements to address. I'll
be back later with more but I just wanted to quickly correct
this misperception. This is not what's being proposed, at least by
me, and not by Spencer, I think.
Eglot will only ever do LSP things so the
eglot-find-{implemtation|declaration|typeDefinition} trio is all
you'll find there, at least until LSP invents a fourth or a fifth.
The major mode _may_ bind these as well of course. Maybe it
may bind them in a xref-defined prefix map _along_ with
<major-mode>-find-shiiz
Anyway, hope to get back to this later.
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/07
- Re: Adding support for xref jumping to headers/interfaces, Spencer Baugh, 2023/11/08
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 2023/11/08
- Re: Adding support for xref jumping to headers/interfaces, Dmitry Gutov, 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, Dmitry Gutov, 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
- Re: Adding support for xref jumping to headers/interfaces, Spencer Baugh, 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 <=
- 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/11
- 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