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: João Távora
Subject: Re: Adding support for xref jumping to headers/interfaces
Date: Sat, 11 Nov 2023 11:30:35 +0000

On Sat, Nov 11, 2023 at 1:05 AM Dmitry Gutov <dmitry@gutov.dev> wrote:
>
> On 10/11/2023 12:06, João Távora wrote:
> > Really, what if the language du jour sometime in the future becomes
> > something like C++ again? Will you add 'type-instantiation,
> > 'type-specialization,  'partial-specialization,  'concept, and so on?
> > Or the C++ backend somehow manages to index the loci of memory
> > allocation to a given arena names at point.  Will 'memory-allocations'
> > also appear in xref.el?
>
> BTW, do you know of any LSP servers for C/C++ have
> implementation-specific actions/endpoints for any of the things that you
> mentioned above?

Clangd, whose source code I've recently become familiar with,
has the capability of doing all of those but my vapourware
'memory-allocations'.  It doesn't expose endpoints to them, I think,
but it's not fundamentally hard to do (clangd has a very rich index
derived from the LLVM AST processing machinery, as you probably know).

>  > When I get around to finishing refactor.el which will inherit most of
>  > Eglot's UI for doing refactorings, I don't plan to burn the concepts
>  > of "organizeImports" and "quickfix" into it.  They are LSP things.
>
> I things refactorings are inherently slower process, so having less
> dedicated commands and more typing won't be a problem.
>
> Do you have any WIP code/patch/branch for refactor.el? I was thinking of
> giving it a shot soon-ish, but it would start with extracting some code
> from Eglot anyway.

Yes, I have a refactor.el started, but  ot sidetracked.  I'll pull it
up soon, it's still unfinished but I would love some help and am
fairly certain we can collaborate to get at least the basics working.
I think the xref-backend-extra-kinds/xref-backend-extra-defs is
the analogue mechanism I was looking for and couldn't quite commit
to but your patch and  this discussion has helped me see it is a
simple and viable way.

Anyway, will try to do that coming weeks, do ping me if I forget,
we can even pair-program via tmate or something.

João



reply via email to

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