Closed LemonBreezes closed 8 months ago
Hi, by definition the :annotation-function
or :affixation-function
should already return a string with a leading space.
Hi, by definition the
:annotation-function
or:affixation-function
should already return a string with a leading space.
Is this documented anywhere? There's no such claim in the manual
Is this documented anywhere? There's no such claim in the manual
Emacs is not specified well if you look at the fine details. Nevertheless it is a de factor definition. :annotation-function
is defined by the default completion UI and the UI does not add any space. Neither does Vertico or any other UI.
Emacs cruft once again...
Not really. It seems actually reasonable to not add a space. Think for example about affixation-functions which want to add icons just right in front of the candidates.
You'd still want the gap between the the candidate and the annotation, but this is moot anyway
No, not in every case, like for example icons.
I also imagine that in some special cases one would want something like candidate(1)
, where (1)
is supplied by the annotation function. Anyway, even if the you disagree with the choice to not add a space, it would be unnecessary work to change this now. I mean we are not talking about a fundamental design flaw. It is just a fine detail.
Hi. So I PR'd a fix to Yasnippet Capf (https://github.com/elken/yasnippet-capf/pull/16) addressing the lack of spacing between candidates and their annotations
I did so by concatenating two spaces to the annotations:
which is similar to what Company Yasnippet does when
@elken is suggesting that Corfu should do this instead so I'm wondering what you think about that and specifically whether you would add that.
company-tooltip-align-annotations
is nil:I'm thinking that it's not a good idea for Corfu to add spacing since other capfs like Company Yasnippet and Pcmpl Args already manage that:
So I wanted you to hear what you think.