Another annotation function is included in the code I shared. Surprisingly it is called ":annotation-function" and will show a string after the completion candidates. It has nothing to do with nerd-icons and could also be a way forward. In my example I have <S> for snippet to follow what others do (<f> for function, <v> for variable, etc.) Mind you that supporting both gives us support for other GUI-like completion frameworks, including company. That I have chosen corfu is personal choice, mainly because it's more lightweight than company.
/PA On Sun, 12 Jul 2026 at 07:37, Ihor Radchenko <[email protected]> wrote: > "Pedro A. Aranda" <[email protected]> writes: > > > Interesting what you say... because I have the following in my .emacs > > > > ------ > > (defvar yas-completion-props > > (list ;; :annotation-function #'(lambda (_) " <S>") > > :exclusive 'no > > ;; :category 'snippet > > :company-kind #'(lambda(_) 'snippet) > > :exit-function #'(lambda (_ _) > > (call-interactively 'yas-expand)))) > > ------ > > > > and if I comment out the company-kind line, I loose the nerd-icon for > > yasnippets. > > > > I'm using corfu-2.1.0 and nerd-icons-corfu 1.0.0 > > In other words, you are not suggesting supporting some common completion > feature, but something very specific to nerd-icons-corfu in particular. > > Indeed, when I open the source code of nerd-icons-corfu, I see that they > explicitly check for :company-kind. But that has nothing to do with > corfu, just a choice of that particular package. > > If we want to go this way, and support various external completion > packages, there is no point focusing on just nerd-icons-corfu. We need > to see more generally what kind of metadata can be attached to the > completion for the commonly used Emacs completion packages. > Could you please research the topic and propose a concrete list of > completion properties and what each of them do? > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> > -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler "Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE! Year 2 of the New Koprocracy This was produced by a human (implied virtues and weaknesses acknowledged) I'd hate this being fed to any form of AS (sorry AI)...
