refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any all-the-icons-* function calls or variable references in your private config will break and should be replaced with their nerd-icons-* equivalent. That said, Doom will continue to install all-the-icons for a while, so feel free to load it if you don't want to fully commit to the change yet. This change is happening because nerd-icon has wider support for GUI and TUI Emacs; has a larger, more consistent selection of symbols; plus unicode coverage. Fix: #7368 Close: #6675 Close: #7364
This commit is contained in:
parent
7bdf7cf7c0
commit
9787022b83
40 changed files with 293 additions and 407 deletions
|
@ -27,7 +27,7 @@ lighter, simpler and faster in many cases.
|
|||
Enable prescient filtering and sorting for Ivy searches.
|
||||
|
||||
** Packages
|
||||
- [[doom-package:all-the-icons-ivy]]* if [[doom-module:+icons]]
|
||||
- [[doom-package:nerd-icons-ivy]]* if [[doom-module:+icons]]
|
||||
- [[doom-package:amx]]
|
||||
- [[doom-package:counsel]]
|
||||
- [[doom-package:counsel-projectile]]
|
||||
|
|
|
@ -34,22 +34,6 @@ Buffers that are considered unreal (see `doom-real-buffer-p') are dimmed with
|
|||
(ivy-append-face candidate 'ivy-modified-buffer))
|
||||
(candidate))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +ivy-rich-buffer-icon (candidate)
|
||||
"Display the icon for CANDIDATE buffer."
|
||||
;; NOTE This is inspired by `all-the-icons-ivy-buffer-transformer', minus the
|
||||
;; buffer name and extra padding as those are handled by `ivy-rich'.
|
||||
(propertize "\t" 'display
|
||||
(if-let* ((buffer (get-buffer candidate))
|
||||
(mode (buffer-local-value 'major-mode buffer)))
|
||||
(or
|
||||
(all-the-icons-ivy--icon-for-mode mode)
|
||||
(all-the-icons-ivy--icon-for-mode (get mode 'derived-mode-parent))
|
||||
(funcall
|
||||
all-the-icons-ivy-family-fallback-for-buffer
|
||||
all-the-icons-ivy-name-fallback-for-buffer))
|
||||
(all-the-icons-icon-for-file candidate))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +ivy-rich-describe-variable-transformer (cand)
|
||||
"Previews the value of the variable in the minibuffer"
|
||||
|
|
|
@ -116,12 +116,6 @@ results buffer.")
|
|||
:config
|
||||
(setq ivy-rich-parse-remote-buffer nil)
|
||||
|
||||
(when (modulep! +icons)
|
||||
(cl-pushnew '(+ivy-rich-buffer-icon)
|
||||
(cadr (plist-get ivy-rich-display-transformers-list
|
||||
'ivy-switch-buffer))
|
||||
:test #'equal))
|
||||
|
||||
(defun ivy-rich-bookmark-filename-or-empty (candidate)
|
||||
(let ((filename (ivy-rich-bookmark-filename candidate)))
|
||||
(if (not filename) "" filename)))
|
||||
|
@ -155,25 +149,15 @@ results buffer.")
|
|||
(switch-buffer-alist (assq 'ivy-rich-candidate (plist-get plist :columns))))
|
||||
(setcar switch-buffer-alist '+ivy-rich-buffer-name))
|
||||
|
||||
(nerd-icons-ivy-rich-mode +1)
|
||||
(ivy-rich-mode +1)
|
||||
(ivy-rich-project-root-cache-mode +1))
|
||||
|
||||
|
||||
(use-package! all-the-icons-ivy
|
||||
(use-package! nerd-icons-ivy-rich
|
||||
:when (modulep! +icons)
|
||||
:after ivy
|
||||
:config
|
||||
;; `all-the-icons-ivy' is incompatible with ivy-rich's switch-buffer
|
||||
;; modifications, so we disable them and merge them ourselves
|
||||
(setq all-the-icons-ivy-buffer-commands nil)
|
||||
|
||||
(all-the-icons-ivy-setup)
|
||||
(after! counsel-projectile
|
||||
(let ((all-the-icons-ivy-file-commands
|
||||
'(counsel-projectile
|
||||
counsel-projectile-find-file
|
||||
counsel-projectile-find-dir)))
|
||||
(all-the-icons-ivy-setup))))
|
||||
:commands (nerd-icons-ivy-rich-mode)
|
||||
:after counsel-projectile)
|
||||
|
||||
|
||||
(use-package! counsel
|
||||
|
@ -314,7 +298,7 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! counsel-projectile
|
||||
:defer t
|
||||
:after ivy-rich
|
||||
:init
|
||||
(define-key!
|
||||
[remap projectile-find-file] #'+ivy/projectile-find-file
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
(package! ivy-posframe :pin "533a8e368fcabfd534761a5c685ce713376fa594"))
|
||||
|
||||
(when (modulep! +icons)
|
||||
(package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d"))
|
||||
(package! nerd-icons-ivy-rich :pin "7197614b27fd562e64b11c91d41bed4443aded90"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue