mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(editor): switch to fork of all-the-icons-completion
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
|
||||
(setq straight-recipe-overrides
|
||||
'((nil . (
|
||||
;; Use fork with more features until PR is merged: https://github.com/iyefrat/all-the-icons-completion/pull/19
|
||||
(all-the-icons-completion :type git :flavor melpa :host github :repo "iyefrat/all-the-icons-completion"
|
||||
:fork (:host github :repo "MintSoup/all-the-icons-completion"))
|
||||
;; Override go-playground to use my fork, which has a fix for
|
||||
;; uploading to go.dev/play.
|
||||
(go-playground :type git :host github :repo "grafov/go-playground"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-marginalia)
|
||||
|
||||
;; Required by all-the-icons
|
||||
(use-package memoize)
|
||||
|
||||
@@ -27,15 +29,31 @@
|
||||
(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 ""))))
|
||||
;; Using original all-the-icons-completion package.
|
||||
(when (fboundp 'all-the-icons-completion-get-file-icon)
|
||||
;; Override default category lookup function to add support for
|
||||
;; project-buffer and project-file.
|
||||
(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 ""))))
|
||||
|
||||
;; Using MintSoup's fork of all-the-icons-completion.
|
||||
(when (not (fboundp 'all-the-icons-completion-get-file-icon))
|
||||
(require 'cl-generic)
|
||||
|
||||
(cl-defmethod all-the-icons-completion-get-icon ((cand string) (cat (eql 'project-buffer)))
|
||||
"Display project-buffer icon for CAND all-the-icons-completion."
|
||||
(all-the-icons-completion-get-icon cand 'buffer))
|
||||
|
||||
;; Add support for 'project-file category by treating it same as 'file.
|
||||
(cl-defmethod all-the-icons-completion-get-icon ((cand string) (cat (eql 'project-file)))
|
||||
"Display project-file icon for CAND all-the-icons-completion."
|
||||
(all-the-icons-completion-get-icon cand 'file))))
|
||||
|
||||
(provide 'siren-all-the-icons)
|
||||
;;; siren-all-the-icons.el ends here
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(("a.el" . "93e5ed8c495794d1ba3c04b43041b95ce01079b1")
|
||||
("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196")
|
||||
("all-the-icons-completion" . "286e2c064a1298be0d8d4100dc91d7a7a554d04a")
|
||||
("all-the-icons-completion" . "b8e3c4ceb862a3cbb771884c1e6b5d884356f141")
|
||||
("all-the-icons-ibuffer" . "54c99aeb17989f684eb7bf3aa88b12adf7dd2d34")
|
||||
("all-the-icons.el" . "51bf77da1ebc3c199dfc11f54c0dce67559f5f40")
|
||||
("anzu" . "5abb37455ea44fa401d5f4c1bdc58adb2448db67")
|
||||
|
||||
Reference in New Issue
Block a user