feat(projects): enable all-the-icons in minibuffer completion

This commit is contained in:
2022-03-14 11:59:04 +00:00
parent 106245af8b
commit e8978f7b44
2 changed files with 18 additions and 0 deletions

View File

@@ -18,5 +18,22 @@
:if window-system
:init (all-the-icons-ibuffer-mode 1))
(use-package all-the-icons-completion
:after (marginalia all-the-icons)
:hook (marginalia-mode . all-the-icons-completion-marginalia-setup)
:init
(all-the-icons-completion-mode)
:config
;; Override default category lookup function.
(defun all-the-icons-completion-get-icon (cand cat)
"Return the icon for the candidate CAND of completion category CAT."
(cl-case cat
(file (all-the-icons-completion-get-file-icon cand))
(project-file (all-the-icons-completion-get-file-icon cand))
(buffer (all-the-icons-completion-get-buffer-icon cand))
(project-buffer (all-the-icons-completion-get-buffer-icon cand))
(t ""))))
(provide 'siren-all-the-icons)
;;; siren-all-the-icons.el ends here

View File

@@ -1,5 +1,6 @@
(("a.el" . "9ad2d18252b729174fe22ed0b2b7670c88f60c31")
("ace-window" . "0577c426a9833ab107bab46c60d1885c611b2fb9")
("all-the-icons-completion" . "9e7d456b0934ecb568b6f05a8445e3f4ce32261f")
("all-the-icons-ibuffer" . "67a331c94af7670a89cea2cd58a1e7b11b83e8a9")
("all-the-icons.el" . "2c963ebb75f211d2f7ac3d2db5f4a9ee2f3e27da")
("anzu" . "5abb37455ea44fa401d5f4c1bdc58adb2448db67")