emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company 74cc6a1 3/3: New var company-text-icons-format


From: ELPA Syncer
Subject: [elpa] externals/company 74cc6a1 3/3: New var company-text-icons-format
Date: Fri, 2 Apr 2021 12:57:07 -0400 (EDT)

branch: externals/company
commit 74cc6a1a7615d80a8d3f6a1352467aa0c6bfa4de
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]