VsCode Icons for Emacs
This package is intended to be used as a dependency to other packages. (e.g. in a Package-Requires: block)
To install separately:
(use-package vscode-icon :ensure t :commands (vscode-icon-for-file))
For best quality icons, users should install Emacs with imagemagick support.
brew install emacs --HEAD --with-librsvg --with-cocoa --with-imagemagick@6
Emacs 27 on OSX without imagemagick support should also work.
(setq json-image (vscode-icon-for-file "somejsonfile.json")) (insert-image json-image)
Take a look at dired-sidebar for more screenshots and example usage.
Using different sized icons
This package comes with 128x128 sized icons as well as 23x23 sized icons.
If emacs comes with imagemagick support compiled in, this package will use the 128x128 sized icons and scale them accordingly.
If emacs doesn’t come with imagemagick support, 23x23 sized icons will be used. If these icons are not a good size, it is possible to convert the icon yourself.
; M-x vscode-icon-convert-and-copy ; Enter the size of the icon you'd like. ; The icons will be converted and moved to a custom user directory ; that can be customized using `vscode-icon-extra-icon-directory'. ; Look at the defcustoms in this package for more details.
; A simple example if I want 16x16 icons: ; M-x vscode-icon-convert-and-copy ; 16 RET ; (setq vscode-icon-size 16)
Emacs scales 128x128 icons better with imagemagick support than my own imagemagick command. It’d be good to figure this out…