Fix latest company-box all-the-icons configuration
This commit is contained in:
parent
3f282829bf
commit
979c201bf1
1 changed files with 48 additions and 33 deletions
|
@ -59,39 +59,54 @@
|
||||||
(setq company-box-show-single-candidate t
|
(setq company-box-show-single-candidate t
|
||||||
company-box-backends-colors nil
|
company-box-backends-colors nil
|
||||||
company-box-max-candidates 50
|
company-box-max-candidates 50
|
||||||
company-box-icons-yasnippet (all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-green)
|
company-box-icons-alist 'company-box-icons-all-the-icons
|
||||||
company-box-icons-unknown (all-the-icons-material "find_in_page" :height 0.8 :face 'all-the-icons-purple)
|
company-box-icons-functions
|
||||||
company-box-icons-elisp
|
'(+company-box-icons--yasnippet company-box-icons--lsp +company-box-icons--elisp company-box-icons--acphp)
|
||||||
(list (all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)
|
company-box-icons-all-the-icons
|
||||||
(all-the-icons-material "check_circle" :height 0.8 :face 'all-the-icons-blue)
|
`((Unknown . ,(all-the-icons-material "find_in_page" :height 0.8 :face 'all-the-icons-purple))
|
||||||
(all-the-icons-material "stars" :height 0.8 :face 'all-the-icons-orange)
|
(Text . ,(all-the-icons-material "text_fields" :height 0.8 :face 'all-the-icons-green))
|
||||||
(all-the-icons-material "format_paint" :height 0.8 :face 'all-the-icons-pink))
|
(Method . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red))
|
||||||
company-box-icons-lsp
|
(Function . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red))
|
||||||
`((1 . ,(all-the-icons-material "text_fields" :height 0.8 :face 'all-the-icons-green)) ; text
|
(Constructor . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red))
|
||||||
(2 . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) ; method
|
(Field . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red))
|
||||||
(3 . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) ; function
|
(Variable . ,(all-the-icons-material "adjust" :height 0.8 :face 'all-the-icons-blue))
|
||||||
(4 . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) ; constructor
|
(Class . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red))
|
||||||
(5 . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) ; field
|
(Interface . ,(all-the-icons-material "settings_input_component" :height 0.8 :face 'all-the-icons-red))
|
||||||
(6 . ,(all-the-icons-material "adjust" :height 0.8 :face 'all-the-icons-blue)) ; variable
|
(Module . ,(all-the-icons-material "view_module" :height 0.8 :face 'all-the-icons-red))
|
||||||
(7 . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red)) ; class
|
(Property . ,(all-the-icons-material "settings" :height 0.8 :face 'all-the-icons-red))
|
||||||
(8 . ,(all-the-icons-material "settings_input_component" :height 0.8 :face 'all-the-icons-red)) ; interface
|
(Unit . ,(all-the-icons-material "straighten" :height 0.8 :face 'all-the-icons-red))
|
||||||
(9 . ,(all-the-icons-material "view_module" :height 0.8 :face 'all-the-icons-red)) ; module
|
(Value . ,(all-the-icons-material "filter_1" :height 0.8 :face 'all-the-icons-red))
|
||||||
(10 . ,(all-the-icons-material "settings" :height 0.8 :face 'all-the-icons-red)) ; property
|
(Enum . ,(all-the-icons-material "plus_one" :height 0.8 :face 'all-the-icons-red))
|
||||||
(11 . ,(all-the-icons-material "straighten" :height 0.8 :face 'all-the-icons-red)) ; unit
|
(Keyword . ,(all-the-icons-material "filter_center_focus" :height 0.8 :face 'all-the-icons-red))
|
||||||
(12 . ,(all-the-icons-material "filter_1" :height 0.8 :face 'all-the-icons-red)) ; value
|
(Snippet . ,(all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-red))
|
||||||
(13 . ,(all-the-icons-material "plus_one" :height 0.8 :face 'all-the-icons-red)) ; enum
|
(Color . ,(all-the-icons-material "color_lens" :height 0.8 :face 'all-the-icons-red))
|
||||||
(14 . ,(all-the-icons-material "filter_center_focus" :height 0.8 :face 'all-the-icons-red)) ; keyword
|
(File . ,(all-the-icons-material "insert_drive_file" :height 0.8 :face 'all-the-icons-red))
|
||||||
(15 . ,(all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-red)) ; snippet
|
(Reference . ,(all-the-icons-material "collections_bookmark" :height 0.8 :face 'all-the-icons-red))
|
||||||
(16 . ,(all-the-icons-material "color_lens" :height 0.8 :face 'all-the-icons-red)) ; color
|
(Folder . ,(all-the-icons-material "folder" :height 0.8 :face 'all-the-icons-red))
|
||||||
(17 . ,(all-the-icons-material "insert_drive_file" :height 0.8 :face 'all-the-icons-red)) ; file
|
(EnumMember . ,(all-the-icons-material "people" :height 0.8 :face 'all-the-icons-red))
|
||||||
(18 . ,(all-the-icons-material "collections_bookmark" :height 0.8 :face 'all-the-icons-red)) ; reference
|
(Constant . ,(all-the-icons-material "pause_circle_filled" :height 0.8 :face 'all-the-icons-red))
|
||||||
(19 . ,(all-the-icons-material "folder" :height 0.8 :face 'all-the-icons-red)) ; folder
|
(Struct . ,(all-the-icons-material "streetview" :height 0.8 :face 'all-the-icons-red))
|
||||||
(20 . ,(all-the-icons-material "people" :height 0.8 :face 'all-the-icons-red)) ; enumMember
|
(Event . ,(all-the-icons-material "event" :height 0.8 :face 'all-the-icons-red))
|
||||||
(21 . ,(all-the-icons-material "pause_circle_filled" :height 0.8 :face 'all-the-icons-red)) ; constant
|
(Operator . ,(all-the-icons-material "control_point" :height 0.8 :face 'all-the-icons-red))
|
||||||
(22 . ,(all-the-icons-material "streetview" :height 0.8 :face 'all-the-icons-red)) ; struct
|
(TypeParameter . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red))
|
||||||
(23 . ,(all-the-icons-material "event" :height 0.8 :face 'all-the-icons-red)) ; event
|
;; (Template . ,(company-box-icons-image "Template.png"))))
|
||||||
(24 . ,(all-the-icons-material "control_point" :height 0.8 :face 'all-the-icons-red)) ; operator
|
(Yasnippet . ,(all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-green))
|
||||||
(25 . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red)))))
|
(ElispFunction . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red))
|
||||||
|
(ElispVariable . ,(all-the-icons-material "check_circle" :height 0.8 :face 'all-the-icons-blue))
|
||||||
|
(ElispFeature . ,(all-the-icons-material "stars" :height 0.8 :face 'all-the-icons-orange))
|
||||||
|
(ElispFace . ,(all-the-icons-material "format_paint" :height 0.8 :face 'all-the-icons-pink))))
|
||||||
|
|
||||||
|
(defun +company-box-icons--yasnippet (candidate)
|
||||||
|
(when (get-text-property 0 'yas-annotation candidate)
|
||||||
|
'Yasnippet))
|
||||||
|
|
||||||
|
(defun +company-box-icons--elisp (candidate)
|
||||||
|
(when (derived-mode-p 'emacs-lisp-mode)
|
||||||
|
(let ((sym (intern candidate)))
|
||||||
|
(cond ((fboundp sym) 'ElispFunction)
|
||||||
|
((boundp sym) 'ElispVariable)
|
||||||
|
((featurep sym) 'ElispFeature)
|
||||||
|
((facep sym) 'ElispFace))))))
|
||||||
|
|
||||||
|
|
||||||
(def-package! company-dict
|
(def-package! company-dict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue