You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the ivy function returning icon for files can be updated according to the recent function all-the-icons-icon-for-dir, see here.
I suggest to go from
(defunall-the-icons-ivy-icon-for-file (s)
"Return icon for filename S.Return the octicon for directory if S is a directory.Otherwise fallback to calling `all-the-icons-icon-for-file'."
(cond
((string-match-p"\\/$" s)
(all-the-icons-octicon "file-directory":face'all-the-icons-ivy-dir-face))
(t (all-the-icons-icon-for-file s))))
to
(defunall-the-icons-ivy-icon-for-file (s)
"Return icon for filename S.Return the octicon for directory if S is a directory.Otherwise fallback to calling `all-the-icons-icon-for-file'."
(cond
((file-directory-p s)
(all-the-icons-icon-for-dir s :face'all-the-icons-ivy-dir-face))
(t (all-the-icons-icon-for-file s))))
This is what is currently implemented in all-the-icons-dired, see here. It gives nice icons for special directories.
Thanks
The text was updated successfully, but these errors were encountered:
A small fix on this code, passing s for all-the-icons-icon-for-dir may not be enough I think it requires absolute path, so maybe consider this version
(defunall-the-icons-ivy-icon-for-file (s)
"Return icon for filename S.Return the octicon for directory if S is a directory.Otherwise fallback to calling `all-the-icons-icon-for-file'."
(let ((s-abs (expand-file-name s (ivy-state-directory ivy-last))))
(cond
((file-directory-p s-abs)
(all-the-icons-icon-for-dir s-abs :face'all-the-icons-ivy-dir-face))
(t (all-the-icons-icon-for-file s)))))
Hello,
I think the ivy function returning icon for files can be updated according to the recent function
all-the-icons-icon-for-dir
, see here.I suggest to go from
to
This is what is currently implemented in all-the-icons-dired, see here. It gives nice icons for special directories.
Thanks
The text was updated successfully, but these errors were encountered: