On Fri, Jul 14, 2023, 11:38 Eli Zaretskii <
eliz@gnu.org> wrote:
>
> Any pointer to achieve something like this with current project.el and
> eglot code would also be great. Maybe with a custom project backend?
Sorry, I don't understand: AFAIU Eglot reuses the same server for all
the buffers under the same major-mode, so you should already have what
you want? Or what am I missing?
Not really like that Eli. Within the set of all the buffers in the major mode, subsets are defined for every project, i.e. return value of project-current. Broadly, that pair {major-mode , project} is the discriminator that determines Eglot's choice of server instance to manage a given buffer. The exception is buffers visited by eglot-extend-to-xref. I believe this is explained in the manual. If it's not clear, we should improve it.
Fillipo, to fully understand your use case and what's missing I need you to create a structural example of those related projects, closely representative of the real one, pack it as a zip or a reference to a Git repository, in a way that I can experience the same limitation you are experiencing myself. Is the server you are using Clangd? If so, say the version.
João