Subject: Re: bug#64101: 29.0.91; Eglot inlay hints rendered out of order

From: João Távora <[email-masked]>
Date: Mon, 19 Jun 2023 23:38:34 +0100

Milan Jovanovic <[email-masked]> writes:

> Btw. I still don’t understand why parts of one hint can’t be simply
> merged.

They could be merged but devising logic and heuristics to do it
correctly would hardly be "simple".  In this particular case, they could
be merged, becasue the ':' label part doesn't have any properties
clashing with the 'index' name-of-parameter label part.  But in general,
that isn't necessarily so, and Eglot is a generic Eglot client, not just
catering to the rust-analyzer server which provides these very fine
grained labels.  So the simplest solution is taken and it is complex
enough.

So here the disadvantages outweigh the benefits.

> Anyway, my recipe to recreate issue:
>
> % rust-analyzer --version
> rust-analyzer 1.70.0 (90c54180 2023-05-31)  —> last rustup version
> (`rustup component add rust-analyzer`)

Thanks.  This was key.  I've reproduced the problem (here, I didn't need
Mac OS) and pushed a fix to emacs-29.  The fix will appear in master
soon and thus also in upcoming Eglot 1.16.

João