|
From: | Dmitry Gutov |
Subject: | Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations |
Date: | Thu, 27 May 2021 01:20:55 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 27.05.2021 00:45, Juri Linkov wrote:
we could have one function :resolution-function (lambda (str fields) (mapcar (lambda (field) (pcase field ('suffix (if (fboundp (intern-soft str)) " <f>")) ('kind (elisp--company-kind str)) ('doc-buffer (elisp--company-doc-buffer str)) ('docsig (elisp--company-doc-string str)) ('location (elisp--company-location str)))) fields))
The downside should be obvious: you waste extra CPU and memory when you only need some of these values, and not all of them.
Which is the case most of the time, IME. That is, for one command I only need 'doc-buffer', for another - 'location', 'suffix' and 'kind' might be displayed together (though in your example they are duplicating one another) on one idle timer, 'docsig' is used in another idle timer.
[Prev in Thread] | Current Thread | [Next in Thread] |