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