hvisB
Would you consider changing this, since this way of deduplication in the frontend is quite inefficient?
I simply consider it part of the requirements (see the other message). And there has been some effort made to ensure that the annotation/kind functions are only called when equal strings are encountered.
Indeed, when the list is long deduplication does show up on the graph, but the impact also depends on the shape of the data, and there probably are some untapped code optimizations still.
Deduplicating in the backend is not difficult, all that is needed is adding a suffix like (1), (2), (3), …
I’m not sure this is very easy (e.g. for LSP clients), and in general it would require a scan across all completions of comparable complexity. Also, showing method overloads with suffixes like 1/2/3 would look rather odd, I think.
Something like that would be generally easy to see very soon (completion popup without both icons and annotations). This approach has worked for years for both Emacs’s default UI and company-mode, so it’s hard to call it fragile.
I suppose it might have been a cause for investigation for some backend authors at some point, but backends would generally avoid internal copying anyway, for performance reasons if nothing else.
As long as the completions have the same annotation (the text in green) and same kind (the icon on the left), they are deduplicated.
Looks like perhaps lsp-mode generates annotations that are more useful for your scenario than the ones that eglot does. If that is the case (and not, maybe, that you have configured lsp-mode/eglot to use different language servers), I suggest filing an issue. This shouldn’t take too much time to change.
Like the article mentions, gestures could be even more handy when used with a touch interface.
Such as the new Android port of Emacs, for example.
Ah, actually, Emacs supports pixelwise window resizing as well.
So it basically comes down to choosing (and implementing) the window management logic which would do something like this for the sake of anything practical.
And making sure that no third-party packages slow down redisplay enough that this movement becomes too jerky.
What’s going on on the gif doesn’t look particularly smooth, so as long as the horizontal steps are limited to multiples of the character width, this should be easy to write in Emacs Lisp (5-10 lines).
But doing something practical with it will require extra work. I.e. the depicted process is probably a part of some specific buffer management/switching mechanism, and that would require some extra analysis to replicate and integrate.