GitXplorerGitXplorer
t

vscode-icons.el

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
3c97cd2de433f6f130c447877afe0cd4709a0f93

refactor: clean duplicated icons

ttaquangtrung committed 13 days ago
Unverified
35de1d8afe85956ea16cbbcc76dacf65a334062a

refactor: clean some duplicated icons

ttaquangtrung committed 13 days ago
Unverified
252ed24fd02992f3d0bda71f162187a319fc98a5

refactor: curate icons list

ttaquangtrung committed 14 days ago
Unverified
0ef0faae3df3963b4f21159a50544b8dbea90d83

fix: icons for latex, markdown, terminal, scratch, messages

ttaquangtrung committed 14 days ago
Unverified
a13054d28975191e2f0dbdd81c82694200b7f154

feat: update new icons

ttaquangtrung committed a month ago
Unverified
31d1ecc1c3d36da4913d1f647fb4a95fad84bb42

config: merge great-icons to file-icons

ttaquangtrung committed a month ago

README

The README file for this repository.

vscode-icons.el

Library for displaying VSCode icons in Emacs.

Introduction

This library displays beautiful SVG icons adopted from modern VSCode extensions such as Microsoft's vscode-icons, VSCode Icons Team's vscode-icons, and Material Theme's vscode-material-icon-theme.

It improves existing packages like all-the-icons.el, nerd-icons.el, and vscode-icon-emacs by providing various original, pretty, and high-quality icons using SVG format. The other packages all-the-icons.el and nerd-icons.el only display single color icons while vscode-icon-emacs only display PNG icons, whose quality might be affected when being resized.

Usage

Below are some useful APIs to get icons:

  • vscode-icons-icon-for-file
  • vscode-icons-icon-for-dir
  • vscode-icons-icon-for-mode
  • vscode-icons-icon-for-imenu
  • vscode-icons-icon-for-buffer

Sample code to use the APIs to prepend the icon in front of a file name.

(defun prepend-file-icon (file-name)
  "Prepend an icon in front of a file name."
  (let* ((icon (if (file-directory-p file-name)
                   (or (vscode-icons-icon-for-dir file-name)
                       (vscode-icons-default-dir-icon))
                 (or (vscode-icons-icon-for-file file-name)
                     (vscode-icons-default-file-icon)))))
    ;; Return a new string which is prepended with the file icon.
    (concat (propertize " " 'display icon) " " file-name)))

Illustration of integrating vscode-icons into dired-mode:

Acknowledgements

This package is inspired by the following projects:

Icons are downloaded from these projects: