branch: externals/company commit 74cc6a1a7615d80a8d3f6a1352467aa0c6bfa4de Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
New var company-text-icons-format Refs #1088 --- company.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/company.el b/company.el index 9847988..85153e3 100644 --- a/company.el +++ b/company.el @@ -1486,12 +1486,16 @@ end of the match." "Mapping of the text icons." :type 'list) -(defun company-text-icons-margin (candidate selected) +(defcustom company-text-icons-format "%s " + "Format string for printing the text icons." + :type 'string) + +(defun company-text-icons-margin (candidate _selected) "Margin function which returns unicode icons." (when-let ((candidate candidate) (kind (company-call-backend 'kind candidate)) (icon (alist-get kind company-text-icons-mapping))) - icon)) + (format company-text-icons-format icon))) (defun company-detect-icons-margin (candidate selected) "Margin function which picks from vscodes icons or unicode icons