nerd-icons.el (92369B)
1 ;;; nerd-icons.el --- Emacs Nerd Font Icons Library -*- lexical-binding: t -*- 2 3 ;; Copyright (C) 2023 Hongyu Ding <rainstormstudio@yahoo.com> 4 5 ;; Author: Hongyu Ding <rainstormstudio@yahoo.com>, Vincent Zhang <seagle0128@gmail.com> 6 ;; Keywords: lisp 7 ;; Version: 0.1.0 8 ;; Package-Requires: ((emacs "24.3")) 9 ;; URL: https://github.com/rainstormstudio/nerd-icons.el 10 ;; Keywords: convenient, lisp 11 12 ;; This program is free software; you can redistribute it and/or modify 13 ;; it under the terms of the GNU General Public License as published by 14 ;; the Free Software Foundation, either version 3 of the License, or 15 ;; (at your option) any later version. 16 17 ;; This program is distributed in the hope that it will be useful, 18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ;; GNU General Public License for more details. 21 22 ;; You should have received a copy of the GNU General Public License 23 ;; along with this program. If not, see <http://www.gnu.org/licenses/>. 24 25 ;;; Commentary: 26 27 ;; This package was inspired by 28 29 ;; - `all-the-icons', found at https://github.com/Alexander-Miller/treemacs/blob/master/src/extra/treemacs-all-the-icons.el 30 ;; - `vim-devicons' for Vim, found at https://github.com/ryanoasis/vim-devicons 31 ;; - `nvim-web-devicons' for NeoVim, found at https://github.com/nvim-tree/nvim-web-devicons 32 33 ;; This package provides an interface to the Nerd Fonts 34 35 ;; - `nerd-fonts', found at https://github.com/ryanoasis/nerd-fonts 36 37 ;;; Code: 38 39 (require 'cl-lib) 40 41 (require 'nerd-icons-data) 42 (require 'nerd-icons-faces) 43 44 (declare-function set-fontset-font "src/fontset.c") 45 46 (defgroup nerd-icons nil 47 "Manage how Nerd Fonts formats icons." 48 :prefix "nerd-icons-" 49 :group 'appearance 50 :group 'convenience) 51 52 (defcustom nerd-icons-color-icons t 53 "Whether or not to include a foreground color when formatting the icon." 54 :group 'nerd-icons 55 :type 'boolean) 56 57 (defcustom nerd-icons-scale-factor 1.0 58 "The base Scale Factor for the `height' face property of an icon." 59 :group 'nerd-icons 60 :type 'number) 61 62 (defcustom nerd-icons-default-adjust 0.0 63 "The default adjustment to be made to the `raise' display property of an icon." 64 :group 'nerd-icons 65 :type 'number) 66 67 (defcustom nerd-icons--cache-limit 2048 68 "Maximum cache size for functions cached by `nerd-icons-cache'." 69 :group 'nerd-icons 70 :type 'integer) 71 72 (defcustom nerd-icons-font-family "Symbols Nerd Font Mono" 73 "The Nerd Font for display icons." 74 :group 'nerd-icons 75 :type 'string) 76 77 (defcustom nerd-icons-fonts-subdirectory nil 78 "The subdirectory within the system fonts folder where the icons are installed." 79 :group 'nerd-icons 80 :type 'directory) 81 82 (defvar nerd-icons-font-names '("NFM.ttf") 83 "List of defined font file names.") 84 85 (defvar nerd-icons-glyph-sets '() "List of defined icon glyph sets.") 86 87 (defvar nerd-icons-extension-icon-alist 88 '( 89 ("fish" nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-lpink) 90 ("zsh" nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-lcyan) 91 ("sh" nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-purple) 92 ("bat" nerd-icons-codicon "nf-cod-terminal_cmd" :face nerd-icons-lsilver) 93 ("cmd" nerd-icons-codicon "nf-cod-terminal_cmd" :face nerd-icons-lsilver) 94 ;; Meta 95 ("tags" nerd-icons-octicon "nf-oct-tag" :face nerd-icons-blue) 96 ("log" nerd-icons-octicon "nf-oct-log" :face nerd-icons-maroon) 97 ;; Config 98 ("node" nerd-icons-devicon "nf-dev-nodejs_small" :face nerd-icons-green) 99 ("babelrc" nerd-icons-mdicon "nf-md-babel" :face nerd-icons-yellow) 100 ("bashrc" nerd-icons-mdicon "nf-md-bash" :face nerd-icons-dpink) 101 ("bowerrc" nerd-icons-devicon "nf-dev-bower" :face nerd-icons-silver) 102 ("cr" nerd-icons-sucicon "nf-seti-crystal" :face nerd-icons-yellow) 103 ("ecr" nerd-icons-sucicon "nf-seti-crystal" :face nerd-icons-yellow) 104 ("ini" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 105 ("properties" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 106 ("eslintignore" nerd-icons-mdicon "nf-md-eslint" :face nerd-icons-purple) 107 ("eslint" nerd-icons-mdicon "nf-md-eslint" :face nerd-icons-lpurple) 108 ("git" nerd-icons-sucicon "nf-seti-git" :face nerd-icons-lred) 109 ("gitattributes" nerd-icons-sucicon "nf-seti-git" :face nerd-icons-lred) 110 ("gitignore" nerd-icons-sucicon "nf-seti-git" :face nerd-icons-lred) 111 ("gitmodules" nerd-icons-sucicon "nf-seti-git" :face nerd-icons-lred) 112 ("mk" nerd-icons-devicon "nf-dev-gnu" :face nerd-icons-dorange) 113 ;; ("cmake" nerd-icons-devicon "cmake") TODO: cmake 114 ("dockerignore" nerd-icons-devicon "nf-dev-docker" :face nerd-icons-dblue) 115 ("xml" nerd-icons-faicon "nf-fa-file_code_o" :face nerd-icons-lorange) 116 ("json" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 117 ("jsonl" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 118 ("cson" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 119 ("yml" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-dyellow) 120 ("yaml" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-dyellow) 121 ("toml" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-orange) 122 ("conf" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-dorange) 123 ("editorconfig" nerd-icons-sucicon "nf-seti-editorconfig" :face nerd-icons-silver) 124 ;; ? 125 ("pkg" nerd-icons-octicon "nf-oct-package" :face nerd-icons-dsilver) 126 ("rpm" nerd-icons-octicon "nf-oct-package" :face nerd-icons-dsilver) 127 ("pkgbuild" nerd-icons-octicon "nf-oct-package" :face nerd-icons-dsilver) 128 ("elc" nerd-icons-octicon "nf-oct-file_binary" :face nerd-icons-dsilver) 129 ("eln" nerd-icons-octicon "nf-oct-file_binary" :face nerd-icons-dsilver) 130 ("gz" nerd-icons-octicon "nf-oct-file_binary" :face nerd-icons-lmaroon) 131 ("zip" nerd-icons-octicon "nf-oct-file_zip" :face nerd-icons-lmaroon) 132 ("7z" nerd-icons-octicon "nf-oct-file_zip" :face nerd-icons-lmaroon) 133 ("zst" nerd-icons-octicon "nf-oct-file_zip" :face nerd-icons-lmaroon) 134 ("dat" nerd-icons-faicon "nf-fa-bar_chart" :face nerd-icons-cyan) 135 ("dmg" nerd-icons-octicon "nf-oct-tools" :face nerd-icons-lsilver) 136 ("dll" nerd-icons-faicon "nf-fa-cogs" :face nerd-icons-silver) 137 ("ds_store" nerd-icons-faicon "nf-fa-cogs" :face nerd-icons-silver) 138 ("exe" nerd-icons-octicon "nf-oct-file_binary" :face nerd-icons-dsilver) 139 ("msg" nerd-icons-octicon "nf-oct-mail" :face nerd-icons-dsilver) 140 ;; Source Codes 141 ("ada" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 142 ("adb" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 143 ("adc" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 144 ("ads" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 145 ("gpr" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-green) 146 ("cgpr" nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-green) 147 ("scpt" nerd-icons-devicon "nf-dev-apple" :face nerd-icons-pink) 148 ;; ("aup" nerd-icons-fileicon "audacity") TODO: audacity 149 ("elm" nerd-icons-sucicon "nf-seti-elm" :face nerd-icons-blue) 150 ("erl" nerd-icons-devicon "nf-dev-erlang" :face nerd-icons-red) 151 ("hrl" nerd-icons-devicon "nf-dev-erlang" :face nerd-icons-dred) 152 ("eex" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lorange) 153 ("leex" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lorange) 154 ("heex" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lorange) 155 ("ex" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lpurple) 156 ("exs" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lred) 157 ("livemd" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lblue) 158 ("java" nerd-icons-devicon "nf-dev-java" :face nerd-icons-purple) 159 ("groovy" nerd-icons-devicon "nf-dev-groovy" :face nerd-icons-cyan) 160 ("gradle" nerd-icons-sucicon "nf-seti-gradle" :face nerd-icons-silver) 161 ("ebuild" nerd-icons-mdicon "nf-md-gentoo" :face nerd-icons-cyan) 162 ("eclass" nerd-icons-mdicon "nf-md-gentoo" :face nerd-icons-blue) 163 ("go" nerd-icons-devicon "nf-dev-go" :face nerd-icons-blue) 164 ("jl" nerd-icons-sucicon "nf-seti-julia" :face nerd-icons-purple) 165 ("magik" nerd-icons-faicon "nf-fa-magic" :face nerd-icons-blue) 166 ;; ("matlab" nerd-icons-devicon "matlab") TODO: matlab 167 ("nix" nerd-icons-mdicon "nf-md-nix" :face nerd-icons-blue) 168 ("pl" nerd-icons-sucicon "nf-seti-perl" :face nerd-icons-lorange) 169 ("pm" nerd-icons-sucicon "nf-seti-perl" :face nerd-icons-lorange) 170 ;; ("pl6" nerd-icons-devicon"raku") TODO: raku 171 ;; ("pm6" nerd-icons-devicon "raku") TODO: raku 172 ("pod" nerd-icons-devicon "nf-dev-perl" :face nerd-icons-lgreen) 173 ("php" nerd-icons-devicon "nf-dev-php" :face nerd-icons-lsilver) 174 ;; ("pony" nerd-icons-devicon "pony") TODO: pony 175 ("ps1" nerd-icons-mdicon "nf-md-powershell" :face nerd-icons-blue) 176 ("pro" nerd-icons-sucicon "nf-seti-prolog" :face nerd-icons-lmaroon) 177 ("proog" nerd-icons-sucicon "nf-seti-prolog" :face nerd-icons-lmaroon) 178 ("py" nerd-icons-devicon "nf-dev-python" :face nerd-icons-dblue) 179 ;; ("idr" nerd-icons-devicon "idris") TODO: idris 180 ;; ("ipynb" nerd-icons-devicon "jupyter") TODO: jupyter 181 ("gem" nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-red) 182 ;; ("raku" nerd-icons-devicon "raku") TODO: raku 183 ;; ("rakumod" nerd-icons-devicon "raku") TODO: raku 184 ("rb" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-lred) 185 ("rs" nerd-icons-devicon "nf-dev-rust" :face nerd-icons-maroon) 186 ("rlib" nerd-icons-devicon "nf-dev-rust" :face nerd-icons-dmaroon) 187 ("r" nerd-icons-sucicon "nf-seti-r" :face nerd-icons-lblue) 188 ("rd" nerd-icons-sucicon "nf-seti-r" :face nerd-icons-lblue) 189 ("rdx" nerd-icons-sucicon "nf-seti-r" :face nerd-icons-lblue) 190 ("rsx" nerd-icons-sucicon "nf-seti-r" :face nerd-icons-lblue) 191 ("svelte" nerd-icons-sucicon "nf-seti-svelte" :face nerd-icons-red) 192 ("gql" nerd-icons-mdicon "nf-md-graphql" :face nerd-icons-dpink) 193 ("graphql" nerd-icons-mdicon "nf-md-graphql" :face nerd-icons-dpink) 194 ;; There seems to be a a bug with this font icon which does not 195 ;; let you propertise it without it reverting to being a lower 196 ;; case phi 197 ("c" nerd-icons-sucicon "nf-custom-c" :face nerd-icons-blue) 198 ("h" nerd-icons-faicon "nf-fa-h_square" :face nerd-icons-purple) 199 ("m" nerd-icons-devicon "nf-dev-apple" ) 200 ("mm" nerd-icons-devicon "nf-dev-apple" ) 201 ;; 202 ("cc" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-blue) 203 ("cpp" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-blue) 204 ("cxx" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-blue) 205 ("hh" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-purple) 206 ("hpp" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-purple) 207 ("hxx" nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-purple) 208 ;; Lisps 209 ("cl" nerd-icons-sucicon "nf-custom-common_lisp" :face nerd-icons-lorange) 210 ("l" nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-orange) 211 ("lisp" nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-orange) 212 ;; ("hy" nerd-icons-sucicon "nf-custom-hy" :face nerd-icons-blue) 213 ("el" nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-purple) 214 ("clj" nerd-icons-devicon "nf-dev-clojure" :face nerd-icons-blue) 215 ("cljc" nerd-icons-devicon "nf-dev-clojure" :face nerd-icons-blue) 216 ("cljs" nerd-icons-devicon "nf-dev-clojure" :face nerd-icons-lyellow) 217 ("coffee" nerd-icons-devicon "nf-dev-coffeescript" :face nerd-icons-maroon) 218 ("iced" nerd-icons-devicon "nf-dev-coffeescript" :face nerd-icons-lmaroon) 219 ("dart" nerd-icons-devicon "nf-dev-dart" :face nerd-icons-blue) 220 ("ledger" nerd-icons-mdicon "nf-md-file_table_box_multiple" :face nerd-icons-green) 221 ("rkt" nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-red) 222 ("scrbl" nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-blue) 223 ;; Stylesheeting 224 ("css" nerd-icons-devicon "nf-dev-css3" :face nerd-icons-yellow) 225 ("scss" nerd-icons-mdicon "nf-md-sass" :face nerd-icons-pink) 226 ("sass" nerd-icons-mdicon "nf-md-sass" :face nerd-icons-dpink) 227 ("less" nerd-icons-devicon "nf-dev-less" :face nerd-icons-dyellow) 228 ;; ("postcss" nerd-icons-devicon "postcss") TODO: postcss 229 ;; ("sss" nerd-icons-devicon "postcss") TODO: postcss 230 ("styl" nerd-icons-devicon "nf-dev-stylus" :face nerd-icons-lgreen) 231 ("csv" nerd-icons-octicon "nf-oct-graph" :face nerd-icons-dblue) 232 ;; haskell 233 ("hs" nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 234 ("chs" nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 235 ("lhs" nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 236 ("hsc" nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 237 ;; Web modes 238 ("inky-haml" nerd-icons-sucicon "nf-seti-haml" :face nerd-icons-lyellow) 239 ("haml" nerd-icons-sucicon "nf-seti-haml" :face nerd-icons-lyellow) 240 ("htm" nerd-icons-devicon "nf-dev-html5" :face nerd-icons-orange) 241 ("html" nerd-icons-devicon "nf-dev-html5" :face nerd-icons-orange) 242 ("inky-er" nerd-icons-devicon "nf-dev-html5" :face nerd-icons-lred) 243 ("inky-erb" nerd-icons-devicon "nf-dev-html5" :face nerd-icons-lred) 244 ("erb" nerd-icons-devicon "nf-dev-html5" :face nerd-icons-lred) 245 ;; ("hbs" nerd-icons-fileicon "moustache") TODO: moustache 246 ("inky-slim" nerd-icons-codicon "nf-cod-dashboard" :face nerd-icons-yellow) 247 ("slim" nerd-icons-codicon "nf-cod-dashboard" :face nerd-icons-yellow) 248 ("jade" nerd-icons-sucicon "nf-seti-jade" :face nerd-icons-red) 249 ("pug" nerd-icons-sucicon "nf-seti-pug" :face nerd-icons-red) 250 ;; Javascript 251 ;; ("d3js" nerd-icons-devicon "d3") TODO: d3 252 ("re" nerd-icons-sucicon "nf-seti-reasonml" :face nerd-icons-red-alt) 253 ("rei" nerd-icons-sucicon "nf-seti-reasonml" :face nerd-icons-dred) 254 ("ml" nerd-icons-sucicon "nf-seti-ocaml" :face nerd-icons-lpink) 255 ("mli" nerd-icons-sucicon "nf-seti-ocaml" :face nerd-icons-dpink) 256 ("react" nerd-icons-devicon "nf-dev-react" :face nerd-icons-lblue) 257 ("ts" nerd-icons-sucicon "nf-seti-typescript" :face nerd-icons-blue-alt) 258 ("js" nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 259 ("es" nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 260 ("jsx" nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-cyan-alt) 261 ("tsx" nerd-icons-sucicon "nf-seti-typescript" :face nerd-icons-blue-alt) 262 ("njs" nerd-icons-mdicon "nf-md-nodejs" :face nerd-icons-lgreen) 263 ("vue" nerd-icons-sucicon "nf-seti-vue" :face nerd-icons-lgreen) 264 265 ("sbt" nerd-icons-sucicon "nf-seti-sbt" :face nerd-icons-red) 266 ("scala" nerd-icons-devicon "nf-dev-scala" :face nerd-icons-red) 267 ("scm" nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-red) 268 ("swift" nerd-icons-devicon "nf-dev-swift" :face nerd-icons-green) 269 270 ("tcl" nerd-icons-mdicon "nf-md-feather" :face nerd-icons-dred) 271 ("exp" nerd-icons-mdicon "nf-md-feather" :face nerd-icons-dred) 272 273 ("tf" nerd-icons-mdicon "nf-md-terraform" :face nerd-icons-purple-alt) 274 ("tfvars" nerd-icons-mdicon "nf-md-terraform" :face nerd-icons-purple-alt) 275 ("tfstate" nerd-icons-mdicon "nf-md-terraform" :face nerd-icons-purple-alt) 276 277 ("asm" nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 278 ;; Verilog(-AMS) and SystemVerilog(-AMS ;; Verilog(-AMS) and SystemVerilog(-AMS) 279 ("v" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 280 ("vams" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 281 ("sv" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 282 ("sva" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 283 ("svh" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 284 ("svams" nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 285 ;; VHDL(-AMS ;; VHDL(-AMS) 286 ("vhd" nerd-icons-octicon "nf-oct-cpu" :face nerd-icons-blue) 287 ("vhdl" nerd-icons-octicon "nf-oct-cpu" :face nerd-icons-blue) 288 ("vhms" nerd-icons-octicon "nf-oct-cpu" :face nerd-icons-blue) 289 ;; Cabal 290 ;; ("cabal" nerd-icons-devicon "cabal") TODO: cabal 291 ;; Kotlin 292 ("kt" nerd-icons-sucicon "nf-seti-kotlin" :face nerd-icons-orange) 293 ("kts" nerd-icons-sucicon "nf-seti-kotlin" :face nerd-icons-orange) 294 ;; Nimrod 295 ("nim" nerd-icons-sucicon "nf-seti-nim" :face nerd-icons-yellow) 296 ("nims" nerd-icons-sucicon "nf-seti-nim" :face nerd-icons-yellow) 297 ;; SQL 298 ("sql" nerd-icons-octicon "nf-oct-database" :face nerd-icons-silver) 299 ;; Styles 300 ;; ("styles" nerd-icons-devicon "style") TODO: style 301 ;; Lua 302 ("lua" nerd-icons-sucicon "nf-seti-lua" :face nerd-icons-dblue) 303 ;; ASCII doc 304 ;; ("adoc" nerd-icons-devicon "asciidoc") TODO: asciidoc 305 ;; ("asciidoc" nerd-icons-devicon "asciidoc") TODO: asciidoc 306 ;; Puppet 307 ("pp" nerd-icons-sucicon "nf-seti-puppet" :face nerd-icons-yellow) 308 ;; Jinja 309 ("j2" nerd-icons-sucicon "nf-seti-jinja" :face nerd-icons-silver) 310 ("jinja2" nerd-icons-sucicon "nf-seti-jinja" :face nerd-icons-silver) 311 ;; Docker 312 ("dockerfile" nerd-icons-sucicon "nf-seti-docker" :face nerd-icons-cyan) 313 ;; Vagrant 314 ;; ("vagrantfile" nerd-icons-fileicon "vagrant") TODO: vagrant 315 ;; GLSL 316 ("glsl" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-blue) 317 ("vert" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-blue) 318 ("tesc" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-purple) 319 ("tese" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-dpurple) 320 ("geom" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-green) 321 ("frag" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-red) 322 ("comp" nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-dblue) 323 ;; CUDA 324 ("cu" nerd-icons-sucicon "nf-custom-c" :face nerd-icons-green) 325 ("cuh" nerd-icons-faicon "nf-fa-h_square" :face nerd-icons-green) 326 ;; Fortran 327 ("f90" nerd-icons-mdicon "nf-md-language_fortran" :face nerd-icons-purple) 328 ;; C# 329 ("cs" nerd-icons-mdicon "nf-md-language_csharp" :face nerd-icons-dblue) 330 ("csx" nerd-icons-mdicon "nf-md-language_csharp" :face nerd-icons-dblue) 331 ;; F# 332 ("fs" nerd-icons-devicon "nf-dev-fsharp" :face nerd-icons-blue-alt) 333 ("fsi" nerd-icons-devicon "nf-dev-fsharp" :face nerd-icons-blue-alt) 334 ("fsx" nerd-icons-devicon "nf-dev-fsharp" :face nerd-icons-blue-alt) 335 ("fsscript" nerd-icons-devicon "nf-dev-fsharp" :face nerd-icons-blue-alt) 336 ;; Godot / GDScript 337 ("gd" nerd-icons-sucicon "nf-seti-godot" :face nerd-icons-blue) 338 ("tscn" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-orange) 339 ("tres" nerd-icons-codicon "nf-cod-settings" :face nerd-icons-orange) 340 ;; zig 341 ("zig" nerd-icons-sucicon "nf-seti-zig" :face nerd-icons-orange) 342 ;; odin 343 ;; ("odin" nerd-icons-fileicon "odin") TODO: odin 344 ;; File Types 345 ("ico" nerd-icons-octicon "nf-oct-file_media" :face nerd-icons-blue) 346 ("png" nerd-icons-mdicon "nf-md-file_png_box" :face nerd-icons-orange) 347 ("gif" nerd-icons-mdicon "nf-md-file_gif_box" :face nerd-icons-green) 348 ("jpeg" nerd-icons-mdicon "nf-md-file_jpg_box" :face nerd-icons-dblue) 349 ("jpg" nerd-icons-mdicon "nf-md-file_jpg_box" :face nerd-icons-dblue) 350 ("webp" nerd-icons-octicon "nf-oct-file_media" :face nerd-icons-dblue) 351 ("xpm" nerd-icons-octicon "nf-oct-file_media" :face nerd-icons-dgreen) 352 ;; Audio 353 ("mp3" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 354 ("wav" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 355 ("m4a" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 356 ("ogg" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 357 ("flac" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 358 ("opus" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 359 ("au" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 360 ("aif" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 361 ("aifc" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 362 ("aiff" nerd-icons-faicon "nf-fa-music" :face nerd-icons-dred) 363 ("svg" nerd-icons-sucicon "nf-seti-svg" :face nerd-icons-lgreen) 364 ;; Video 365 ("mov" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 366 ("mp4" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 367 ("ogv" nerd-icons-faicon "nf-fa-film" :face nerd-icons-dblue) 368 ("mpg" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 369 ("mpeg" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 370 ("flv" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 371 ("ogv" nerd-icons-faicon "nf-fa-film" :face nerd-icons-dblue) 372 ("mkv" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 373 ("webm" nerd-icons-faicon "nf-fa-film" :face nerd-icons-blue) 374 ;; Fonts 375 ("ttf" nerd-icons-faicon "nf-fa-font" :face nerd-icons-dcyan) 376 ("woff" nerd-icons-faicon "nf-fa-font" :face nerd-icons-cyan) 377 ("woff2" nerd-icons-faicon "nf-fa-font" :face nerd-icons-cyan) 378 ;; Archives 379 ("iso" nerd-icons-mdicon "nf-md-disc" :face nerd-icons-orange) 380 ("tar" nerd-icons-mdicon "nf-md-zip_box" :face nerd-icons-orange) 381 ("rar" nerd-icons-mdicon "nf-md-zip_box" :face nerd-icons-orange) 382 ("tgz" nerd-icons-mdicon "nf-md-zip_box" :face nerd-icons-orange) 383 ("jar" nerd-icons-devicon "nf-dev-java" :face nerd-icons-dpurple) 384 ;; Doc 385 ("pdf" nerd-icons-codicon "nf-cod-file_pdf" :face nerd-icons-dred) 386 ("text" nerd-icons-faicon "nf-fa-file_text" :face nerd-icons-cyan) 387 ("txt" nerd-icons-faicon "nf-fa-file_text" :face nerd-icons-cyan) 388 ("doc" nerd-icons-mdicon "nf-md-file_word" :face nerd-icons-blue) 389 ("docx" nerd-icons-mdicon "nf-md-file_word" :face nerd-icons-blue) 390 ("docm" nerd-icons-mdicon "nf-md-file_word" :face nerd-icons-blue) 391 ("texi" nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 392 ("tex" nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 393 ("ltx" nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 394 ("dtx" nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 395 ("sty" nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 396 ("md" nerd-icons-octicon "nf-oct-markdown" :face nerd-icons-lblue) 397 ("bib" nerd-icons-mdicon "nf-md-book" :face nerd-icons-lblue) 398 ("org" nerd-icons-sucicon "nf-custom-orgmode" :face nerd-icons-lgreen) 399 ("org_archive" nerd-icons-sucicon "nf-custom-orgmode" :face nerd-icons-lgreen) 400 ("pps" nerd-icons-mdicon "nf-md-file_powerpoint" :face nerd-icons-orange) 401 ("ppt" nerd-icons-mdicon "nf-md-file_powerpoint" :face nerd-icons-orange) 402 ("pptsx" nerd-icons-mdicon "nf-md-file_powerpoint" :face nerd-icons-orange) 403 ("ppttx" nerd-icons-mdicon "nf-md-file_powerpoint" :face nerd-icons-orange) 404 ("knt" nerd-icons-mdicon "nf-md-file_powerpoint" :face nerd-icons-cyan) 405 ("xlsx" nerd-icons-mdicon "nf-md-file_excel" :face nerd-icons-dgreen) 406 ("xlsm" nerd-icons-mdicon "nf-md-file_excel" :face nerd-icons-dgreen) 407 ("xlsb" nerd-icons-mdicon "nf-md-file_excel" :face nerd-icons-dgreen) 408 ("xltx" nerd-icons-mdicon "nf-md-file_excel" :face nerd-icons-dgreen) 409 ("xltm" nerd-icons-mdicon "nf-md-file_excel" :face nerd-icons-dgreen) 410 ("epub" nerd-icons-mdicon "nf-md-book_open" :face nerd-icons-green) 411 ("ly" nerd-icons-faicon "nf-fa-music" :face nerd-icons-green) 412 ;; 413 ("key" nerd-icons-octicon "nf-oct-key" :face nerd-icons-lblue) 414 ("pem" nerd-icons-octicon "nf-oct-key" :face nerd-icons-orange) 415 ("p12" nerd-icons-octicon "nf-oct-key" :face nerd-icons-dorange) 416 ("crt" nerd-icons-octicon "nf-oct-key" :face nerd-icons-lblue) 417 ("pub" nerd-icons-octicon "nf-oct-key" :face nerd-icons-blue) 418 ("gpg" nerd-icons-octicon "nf-oct-key" :face nerd-icons-lblue) 419 ("kdbx" nerd-icons-octicon "nf-oct-key" :face nerd-icons-green) 420 ("cache" nerd-icons-octicon "nf-oct-database" :face nerd-icons-green) 421 ;; backup 422 ("backup" nerd-icons-mdicon "nf-md-file_restore" :face nerd-icons-lblue) 423 ("old" nerd-icons-mdicon "nf-md-file_restore" :face nerd-icons-lblue) 424 ("bak" nerd-icons-mdicon "nf-md-file_restore" :face nerd-icons-lblue))) 425 426 (defvar nerd-icons-regexp-icon-alist 427 '( 428 ;; 429 ("^TAGS$" nerd-icons-octicon "nf-oct-tag" :face nerd-icons-blue) 430 ("^TODO$" nerd-icons-octicon "nf-oct-checklist" :face nerd-icons-lyellow) 431 ("^LICENSE$" nerd-icons-octicon "nf-oct-book" :face nerd-icons-blue) 432 ("^readme" nerd-icons-octicon "nf-oct-book" :face nerd-icons-lcyan) 433 434 ;; Config 435 ("nginx$" nerd-icons-devicon "nf-dev-nginx" :face nerd-icons-dgreen) 436 ;; ("apache$" nerd-icons-alltheicon "apache") TODO: apache 437 438 ;; C 439 ("^Makefile$" nerd-icons-sucicon "nf-seti-makefile" :face nerd-icons-dorange) 440 ("^CMakeLists.txt$" nerd-icons-sucicon "nf-seti-makefile" :face nerd-icons-red) ;; TODO: cmake 441 ("^CMakeCache.txt$" nerd-icons-sucicon "nf-seti-makefile" :face nerd-icons-blue) ;; TODO: cmakecache 442 ("^meson.build$" nerd-icons-sucicon "nf-seti-makefile" :face nerd-icons-purple) ;; TODO: meson 443 ("^meson_options.txt$" nerd-icons-sucicon "nf-seti-makefile" :face nerd-icons-purple) ;; TODO: meson 444 445 ;; Docker 446 ("^\\.?Dockerfile" nerd-icons-sucicon "nf-seti-docker" :face nerd-icons-blue) 447 448 ;; Homebrew 449 ("^Brewfile$" nerd-icons-faicon "nf-fa-beer" :face nerd-icons-lsilver) 450 451 ;; ;; AWS 452 ("^stack.*.json$" nerd-icons-devicon "nf-dev-aws" :face nerd-icons-orange) 453 ("^serverless\\.yml$" nerd-icons-faicon "nf-fa-bolt" :face nerd-icons-yellow) 454 455 ;; lock files 456 ("~$" nerd-icons-octicon "nf-oct-lock" :face nerd-icons-maroon) 457 458 ;; Source Codes 459 ("^mix.lock$" nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lyellow) 460 461 ;; Ruby 462 ("^Gemfile\\(\\.lock\\)?$" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-red) 463 ("_?test\\.rb$" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-red) 464 ("_?test_helper\\.rb$" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-dred) 465 ("_?spec\\.rb$" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-red) 466 ("_?spec_helper\\.rb$" nerd-icons-octicon "nf-oct-ruby" :face nerd-icons-dred) 467 468 ("-?spec\\.ts$" nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue) 469 ("-?test\\.ts$" nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue) 470 ("-?spec\\.js$" nerd-icons-mdicon "nf-md-language_javascript" :face nerd-icons-lpurple) 471 ("-?test\\.js$" nerd-icons-mdicon "nf-md-language_javascript" :face nerd-icons-lpurple) 472 ("-?spec\\.jsx$" nerd-icons-mdicon "nf-md-react" :face nerd-icons-blue-alt) 473 ("-?test\\.jsx$" nerd-icons-mdicon "nf-md-react" :face nerd-icons-blue-alt) 474 475 ;; Git 476 ("^MERGE_" nerd-icons-octicon "nf-oct-git_merge" :face nerd-icons-red) 477 ("^COMMIT_EDITMSG" nerd-icons-octicon "nf-oct-git_commit" :face nerd-icons-red) 478 479 ;; Stylesheeting 480 ("stylelint" nerd-icons-sucicon "nf-seti-stylelint" :face nerd-icons-lyellow) 481 482 ;; JavaScript 483 ("^package.json$" nerd-icons-devicon "nf-dev-npm" :face nerd-icons-red) 484 ("^package.lock.json$" nerd-icons-devicon "nf-dev-npm" :face nerd-icons-dred) 485 ("^yarn\\.lock" nerd-icons-sucicon "nf-seti-yarn" :face nerd-icons-blue-alt) 486 ("\\.npmignore$" nerd-icons-devicon "nf-dev-npm" :face nerd-icons-dred) 487 ("^bower.json$" nerd-icons-devicon "nf-dev-bower" :face nerd-icons-lorange) 488 ("^gulpfile" nerd-icons-devicon "nf-dev-gulp" :face nerd-icons-lred) 489 ("^gruntfile" nerd-icons-devicon "nf-dev-grunt" :face nerd-icons-lyellow) 490 ("^webpack" nerd-icons-mdicon "nf-md-webpack" :face nerd-icons-lblue) 491 492 ;; Go 493 ("^go.mod$" nerd-icons-sucicon "nf-seti-config" :face nerd-icons-blue-alt) 494 ("^go.work$" nerd-icons-sucicon "nf-seti-config" :face nerd-icons-blue-alt) 495 496 ;; Groovy 497 ("Jenkinsfile\\'" nerd-icons-devicon "nf-dev-groovy" :face nerd-icons-cyan-alt) 498 499 ;; Emacs 500 ("bookmark" nerd-icons-octicon "nf-oct-bookmark" :face nerd-icons-lpink) 501 502 ("^\\*scratch\\*$" nerd-icons-faicon "nf-fa-sticky_note" :face nerd-icons-lyellow) 503 ("^\\*scratch.*" nerd-icons-faicon "nf-fa-sticky_note" :face nerd-icons-yellow) 504 ("^\\*new-tab\\*$" nerd-icons-mdicon "nf-md-star" :face nerd-icons-cyan) 505 ("Cask\\'" nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-blue) 506 ("Eask\\'" nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-blue) 507 508 ("^\\." nerd-icons-octicon "nf-oct-gear"))) 509 510 (defvar nerd-icons-default-file-icon 511 '(nerd-icons-faicon "nf-fa-file_o")) 512 513 (defvar nerd-icons-dir-icon-alist 514 '( 515 ("trash" nerd-icons-faicon "nf-fa-trash_o") 516 ("dropbox" nerd-icons-faicon "nf-fa-dropbox") 517 ("google[ _-]drive" nerd-icons-mdicon "nf-md-folder_google_drive") 518 ("github" nerd-icons-sucicon "nf-custom-folder_github") 519 ("^atom$" nerd-icons-devicon "nf-dev-atom") 520 ("documents" nerd-icons-mdicon "nf-md-folder_file") 521 ("download" nerd-icons-mdicon "nf-md-folder_download") 522 ("desktop" nerd-icons-octicon "nf-oct-device_desktop") 523 ("pictures" nerd-icons-mdicon "nf-md-folder_image") 524 ("photos" nerd-icons-faicon "nf-fa-camera_retro") 525 ("music" nerd-icons-mdicon "nf-md-folder_music") 526 ("movies" nerd-icons-faicon "nf-fa-film") 527 ("code" nerd-icons-octicon "nf-oct-code") 528 ("workspace" nerd-icons-octicon "nf-oct-code") 529 ;; ("test" nerd-icons-devicon "test-dir") 530 ("\\.git" nerd-icons-sucicon "nf-custom-folder_git") 531 ("\\.config" nerd-icons-sucicon "nf-custom-folder_config") 532 (".?" nerd-icons-sucicon "nf-custom-folder_oct"))) 533 534 (defvar nerd-icons-weather-icon-alist 535 '( 536 ("tornado" nerd-icons-wicon "nf-weather-tornado") 537 ("hurricane" nerd-icons-wicon "nf-weather-hurricane") 538 ("thunderstorms" nerd-icons-wicon "nf-weather-thunderstorm") 539 ("sunny" nerd-icons-wicon "nf-weather-day_sunny") 540 ("rain.*snow" nerd-icons-wicon "nf-weather-rain_mix") 541 ("rain.*hail" nerd-icons-wicon "nf-weather-rain_mix") 542 ("sleet" nerd-icons-wicon "nf-weather-sleet") 543 ("hail" nerd-icons-wicon "nf-weather-hail") 544 ("drizzle" nerd-icons-wicon "nf-weather-sprinkle") 545 ("rain" nerd-icons-wicon "nf-weather-showers") 546 ("showers" nerd-icons-wicon "nf-weather-showers") 547 ("blowing.*snow" nerd-icons-wicon "nf-weather-snow_wind") 548 ("snow" nerd-icons-wicon "nf-weather-snow") 549 ("dust" nerd-icons-wicon "nf-weather-dust") 550 ("fog" nerd-icons-wicon "nf-weather-fog") 551 ("haze" nerd-icons-wicon "nf-weather-day_haze") 552 ("smoky" nerd-icons-wicon "nf-weather-smoke") 553 ("blustery" nerd-icons-wicon "nf-weather-cloudy_windy") 554 ("windy" nerd-icons-wicon "nf-weather-cloudy_gusts") 555 ("cold" nerd-icons-wicon "nf-weather-snowflake_cold") 556 ("partly.*cloudy.*night" nerd-icons-wicon "nf-weather-night_alt_partly_cloudy") 557 ("partly.*cloudy" nerd-icons-wicon "nf-weather-day_cloudy_high") 558 ("cloudy.*night" nerd-icons-wicon "nf-weather-night_alt_cloudy") 559 ("cxloudy.*day" nerd-icons-wicon "nf-weather-day_cloudy") 560 ("cloudy" nerd-icons-wicon "nf-weather-cloudy") 561 ("clear.*night" nerd-icons-wicon "nf-weather-night_clear") 562 ("fair.*night" nerd-icons-wicon "nf-weather-stars") 563 ("fair.*day" nerd-icons-wicon "nf-weather-horizon") 564 ("hot" nerd-icons-wicon "nf-weather-hot") 565 ("not.*available" nerd-icons-wicon "nf-weather-na"))) 566 567 (defvar nerd-icons-mode-icon-alist 568 '( 569 (emacs-lisp-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-purple) 570 (circe-server-mode nerd-icons-faicon "nf-fa-commenting_o") 571 (circe-channel-mode nerd-icons-faicon "nf-fa-commenting_o") 572 (circe-query-mode nerd-icons-faicon "nf-fa-commenting_o") 573 (crystal-mode nerd-icons-sucicon "nf-custom-crystal" :face nerd-icons-yellow) 574 (erc-mode nerd-icons-faicon "nf-fa-commenting_o") 575 (inferior-emacs-lisp-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-lblue) 576 (dired-mode nerd-icons-octicon "nf-oct-file_directory") 577 (lisp-interaction-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-orange) 578 (sly-mrepl-mode nerd-icons-sucicon "nf-custom-common_lisp" :face nerd-icons-orange) 579 (slime-repl-mode nerd-icons-sucicon "nf-custom-common_lisp" :face nerd-icons-orange) 580 (org-mode nerd-icons-sucicon "nf-custom-orgmode" :face nerd-icons-lgreen) 581 (ledger-mode nerd-icons-mdicon "nf-md-file_table_box_multiple" :face nerd-icons-green) 582 (typescript-mode nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue-alt) 583 (typescript-ts-mode nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue-alt) 584 (typescript-tsx-mode nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue-alt) 585 (tsx-ts-mode nerd-icons-mdicon "nf-md-language_typescript" :face nerd-icons-blue-alt) 586 (js-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 587 (js-ts-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 588 (js-jsx-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 589 (js2-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 590 (js3-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-yellow) 591 (rjsx-mode nerd-icons-devicon "nf-dev-javascript" :face nerd-icons-cyan-alt) 592 (term-mode nerd-icons-devicon "nf-dev-terminal") 593 (vterm-mode nerd-icons-devicon "nf-dev-terminal") 594 (eshell-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-purple) 595 (magit-refs-mode nerd-icons-devicon "nf-dev-git_branch" :face nerd-icons-red) 596 (magit-process-mode nerd-icons-octicon "nf-oct-mark_github") 597 (magit-diff-mode nerd-icons-devicon "nf-dev-git_compare" :face nerd-icons-lblue) 598 (ediff-mode nerd-icons-devicon "nf-dev-git_compare" :face nerd-icons-red) 599 (diff-mode nerd-icons-devicon "nf-dev-git_compare" :face nerd-icons-lred) 600 (comint-mode nerd-icons-faicon "nf-fa-terminal" :face nerd-icons-lblue) 601 (eww-mode nerd-icons-faicon "nf-fa-firefox" :face nerd-icons-red) 602 (xwidget-webkit-mode nerd-icons-faicon "nf-fa-chrome" :face nerd-icons-blue) 603 (org-agenda-mode nerd-icons-octicon "nf-oct-checklist" :face nerd-icons-lgreen) 604 (cfw:calendar-mode nerd-icons-octicon "nf-oct-calendar") 605 (ibuffer-mode nerd-icons-faicon "nf-fa-files_o" :face nerd-icons-dsilver) 606 (messages-buffer-mode nerd-icons-faicon "nf-fa-file_o" :face nerd-icons-dsilver) 607 (help-mode nerd-icons-faicon "nf-fa-info" :face nerd-icons-purple) 608 (helpful-mode nerd-icons-faicon "nf-fa-info" :face nerd-icons-purple) 609 (Info-mode nerd-icons-faicon "nf-fa-info" :face nerd-icons-blue) 610 (benchmark-init/tree-mode nerd-icons-faicon "nf-fa-dashboard") 611 (jenkins-mode nerd-icons-devicon "nf-dev-jenkins" :face nerd-icons-blue) 612 (magit-popup-mode nerd-icons-sucicon "nf-seti-git" :face nerd-icons-red) 613 (magit-status-mode nerd-icons-sucicon "nf-seti-git" :face nerd-icons-lred) 614 (magit-log-mode nerd-icons-sucicon "nf-seti-git" :face nerd-icons-green) 615 (mu4e-compose-mode nerd-icons-octicon "nf-oct-pencil") 616 (mu4e-headers-mode nerd-icons-octicon "nf-oct-mail") 617 (mu4e-main-mode nerd-icons-octicon "nf-oct-mail") 618 (mu4e-view-mode nerd-icons-codicon "nf-cod-mail_read") 619 (sieve-mode nerd-icons-octicon "nf-oct-mail") 620 (gnus-group-mode nerd-icons-octicon "nf-oct-mail") 621 (gnus-summary-mode nerd-icons-octicon "nf-oct-mail") 622 (gnus-article-mode nerd-icons-codicon "nf-cod-mail_read") 623 (message-mode nerd-icons-octicon "nf-oct-pencil") 624 (package-menu-mode nerd-icons-faicon "nf-fa-archive" :face nerd-icons-silver) 625 (paradox-menu-mode nerd-icons-faicon "nf-fa-archive" :face nerd-icons-silver) 626 (Custom-mode nerd-icons-codicon "nf-cod-settings") 627 628 ;; Special matcher for Web Mode based on the `web-mode-content-type' of the current buffer 629 (web-mode nerd-icons--web-mode-icon) 630 631 (fundamental-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-dsilver) 632 (special-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-yellow) 633 (cask-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-blue) 634 (eask-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-blue) 635 (text-mode nerd-icons-faicon "nf-fa-file_text" :face nerd-icons-cyan) 636 (enh-ruby-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-lred) 637 (ruby-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-lred) 638 (ruby-ts-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-lred) 639 (inf-ruby-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-red) 640 (projectile-rails-compilation-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-red) 641 (rspec-compilation-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-red) 642 (rake-compilation-mode nerd-icons-devicon "nf-dev-ruby" :face nerd-icons-red) 643 (sh-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-purple) 644 (bash-ts-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-purple) 645 (shell-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-purple) 646 (fish-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-lpink) 647 (bat-mode nerd-icons-codicon "nf-cod-terminal_cmd" :face nerd-icons-lsilver) 648 (nginx-mode nerd-icons-devicon "nf-dev-nginx" :face nerd-icons-dgreen) 649 ;; (apache-mode nerd-icons-alltheicon "apache" :face nerd-icons-dgreen) 650 (makefile-mode nerd-icons-devicon "nf-dev-gnu" :face nerd-icons-dorange) 651 (makefile-ts-mode nerd-icons-devicon "nf-dev-gnu" :face nerd-icons-dorange) 652 ;; (cmake-mode nerd-icons-fileicon "cmake" :face nerd-icons-red) 653 ;; (cmake-ts-mode nerd-icons-fileicon "cmake" :face nerd-icons-red) 654 (dockerfile-mode nerd-icons-sucicon "nf-seti-docker" :face nerd-icons-blue) 655 (dockerfile-ts-mode nerd-icons-sucicon "nf-seti-docker" :face nerd-icons-blue) 656 (docker-compose-mode nerd-icons-sucicon "nf-seti-docker" :face nerd-icons-lblue) 657 (nxml-mode nerd-icons-faicon "nf-fa-file_code_o" :face nerd-icons-lorange) 658 (conf-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-lyellow) 659 (json-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 660 (json-ts-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 661 (jsonian-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-yellow) 662 (yaml-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-dyellow) 663 (yaml-ts-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-dyellow) 664 (toml-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-orange) 665 (toml-ts-mode nerd-icons-codicon "nf-cod-settings" :face nerd-icons-orange) 666 (elisp-byte-code-mode nerd-icons-octicon "nf-oct-file_binary" :face nerd-icons-dsilver) 667 (archive-mode nerd-icons-octicon "nf-oct-file_zip" :face nerd-icons-lmaroon) 668 (elm-mode nerd-icons-sucicon "nf-custom-elm" :face nerd-icons-blue) 669 (erlang-mode nerd-icons-devicon "nf-dev-erlang" :face nerd-icons-red) 670 (elixir-mode nerd-icons-sucicon "nf-custom-elixir" :face nerd-icons-lorange) 671 (elixir-ts-mode nerd-icons-sucicon "nf-custom-elixir" :face nerd-icons-lorange) 672 (java-mode nerd-icons-devicon "nf-dev-java" :face nerd-icons-purple) 673 (groovy-mode nerd-icons-devicon "nf-dev-groovy" :face nerd-icons-cyan) 674 (java-ts-mode nerd-icons-devicon "nf-dev-java" :face nerd-icons-purple) 675 (go-mode nerd-icons-devicon "nf-dev-go" :face nerd-icons-blue) 676 (go-ts-mode nerd-icons-devicon "nf-dev-go" :face nerd-icons-blue) 677 (go-dot-mod-mode nerd-icons-sucicon "nf-seti-config" :face nerd-icons-blue-alt) 678 (go-mod-ts-mode nerd-icons-sucicon "nf-seti-config" :face nerd-icons-blue-alt) 679 (go-dot-work-mode nerd-icons-sucicon "nf-seti-config" :face nerd-icons-blue-alt) 680 (graphql-mode nerd-icons-sucicon "nf-seti-graphql" :face nerd-icons-dpink) 681 ;; (matlab-mode nerd-icons-fileicon "matlab" :face nerd-icons-orange) 682 (nix-mode nerd-icons-mdicon "nf-md-nix" :face nerd-icons-blue) 683 (perl-mode nerd-icons-devicon "nf-dev-perl" :face nerd-icons-lorange) 684 (cperl-mode nerd-icons-devicon "nf-dev-perl" :face nerd-icons-lorange) 685 (php-mode nerd-icons-devicon "nf-dev-php" :face nerd-icons-lsilver) 686 (php-ts-mode nerd-icons-devicon "nf-dev-php" :face nerd-icons-lsilver) 687 (prolog-mode nerd-icons-devicon "nf-dev-prolog" :face nerd-icons-lmaroon) 688 (python-mode nerd-icons-devicon "nf-dev-python" :face nerd-icons-dblue) 689 (python-ts-mode nerd-icons-devicon "nf-dev-python" :face nerd-icons-dblue) 690 (inferior-python-mode nerd-icons-devicon "nf-dev-python" :face nerd-icons-dblue) 691 ;; (racket-mode nerd-icons-fileicon "racket" :face nerd-icons-red) 692 (rust-mode nerd-icons-devicon "nf-dev-rust" :face nerd-icons-maroon) 693 (rustic-mode nerd-icons-devicon "nf-dev-rust" :face nerd-icons-maroon) 694 (rust-ts-mode nerd-icons-devicon "nf-dev-rust" :face nerd-icons-maroon) 695 (scala-mode nerd-icons-devicon "nf-dev-scala" :face nerd-icons-red) 696 ;; (scheme-mode nerd-icons-fileicon "scheme" :face nerd-icons-red) 697 (swift-mode nerd-icons-devicon "nf-dev-swift" :face nerd-icons-green) 698 (svelte-mode nerd-icons-sucicon "nf-seti-svelte" :face nerd-icons-red) 699 (ada-mode nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 700 (ada-ts-mode nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-blue) 701 (gpr-mode nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-green) 702 (gpr-ts-mode nerd-icons-sucicon "nf-custom-ada" :face nerd-icons-green) 703 (c-mode nerd-icons-sucicon "nf-custom-c" :face nerd-icons-blue) 704 (c-ts-mode nerd-icons-sucicon "nf-custom-c" :face nerd-icons-blue) 705 (c++-mode nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-blue) 706 (c++-ts-mode nerd-icons-sucicon "nf-custom-cpp" :face nerd-icons-blue) 707 (csharp-mode nerd-icons-mdicon "nf-md-language_csharp" :face nerd-icons-dblue) 708 (csharp-ts-mode nerd-icons-mdicon "nf-md-language_csharp" :face nerd-icons-dblue) 709 (clojure-mode nerd-icons-devicon "nf-dev-clojure_alt" :face nerd-icons-blue) 710 (clojure-ts-mode nerd-icons-devicon "nf-dev-clojure_alt" :face nerd-icons-blue) 711 (cider-repl-mode nerd-icons-devicon "nf-dev-clojure_alt" :face nerd-icons-green) 712 (clojurec-mode nerd-icons-sucicon "nf-seti-clojure" :face nerd-icons-blue) 713 (clojurec-ts-mode nerd-icons-sucicon "nf-seti-clojure" :face nerd-icons-blue) 714 (clojurescript-mode nerd-icons-devicon "nf-dev-clojure_alt" :face nerd-icons-lyellow) 715 (clojurescript-ts-mode nerd-icons-devicon "nf-dev-clojure_alt" :face nerd-icons-lyellow) 716 (coffee-mode nerd-icons-devicon "nf-dev-coffeescript" :face nerd-icons-maroon) 717 (lisp-mode nerd-icons-sucicon "nf-custom-scheme" :face nerd-icons-orange) 718 (css-mode nerd-icons-devicon "nf-dev-css3" :face nerd-icons-yellow) 719 (css-ts-mode nerd-icons-devicon "nf-dev-css3" :face nerd-icons-yellow) 720 (scss-mode nerd-icons-mdicon "nf-md-sass" :face nerd-icons-pink) 721 (sass-mode nerd-icons-mdicon "nf-md-sass" :face nerd-icons-dpink) 722 (less-css-mode nerd-icons-devicon "nf-dev-less" :face nerd-icons-dyellow) 723 (stylus-mode nerd-icons-devicon "nf-dev-stylus" :face nerd-icons-lgreen) 724 (csv-mode nerd-icons-octicon "nf-oct-graph" :face nerd-icons-dblue) 725 (gdscript-mode nerd-icons-sucicon "nf-seti-godot" :face nerd-icons-blue) 726 (gdscript-ts-mode nerd-icons-sucicon "nf-seti-godot" :face nerd-icons-blue) 727 (haskell-mode nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 728 (haskell-c2hs-mode nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 729 (literate-haskell-mode nerd-icons-devicon "nf-dev-haskell" :face nerd-icons-red) 730 (haml-mode nerd-icons-sucicon "nf-seti-haml" :face nerd-icons-lyellow) 731 (html-mode nerd-icons-devicon "nf-dev-html5" :face nerd-icons-orange) 732 (html-ts-mode nerd-icons-devicon "nf-dev-html5" :face nerd-icons-orange) 733 (rhtml-mode nerd-icons-devicon "nf-dev-html5" :face nerd-icons-lred) 734 ;; (mustache-mode nerd-icons-fileicon "moustache" :face nerd-icons-green) 735 (slim-mode nerd-icons-codicon "nf-cod-dashboard" :face nerd-icons-yellow) 736 (jade-mode nerd-icons-sucicon "nf-seti-jade" :face nerd-icons-red) 737 (pug-mode nerd-icons-sucicon "nf-seti-pug" :face nerd-icons-red) 738 (react-mode nerd-icons-devicon "nf-dev-react" :face nerd-icons-lblue) 739 (image-mode nerd-icons-octicon "nf-oct-file_media" :face nerd-icons-blue) 740 (texinfo-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 741 (markdown-mode nerd-icons-octicon "nf-oct-markdown" :face nerd-icons-lblue) 742 (markdown-ts-mode nerd-icons-octicon "nf-oct-markdown" :face nerd-icons-lblue) 743 ;; (bibtex-mode nerd-icons-fileicon "bib" :face nerd-icons-maroon) 744 (compilation-mode nerd-icons-faicon "nf-fa-cogs") 745 (objc-mode nerd-icons-faicon "nf-fa-apple") 746 (tuareg-mode nerd-icons-sucicon "nf-seti-ocaml") 747 (purescript-mode nerd-icons-sucicon "nf-seti-purescript") 748 (verilog-mode nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 749 (verilog-ts-mode nerd-icons-mdicon "nf-md-chip" :face nerd-icons-red) 750 (vhdl-mode nerd-icons-octicon "nf-oct-cpu" :face nerd-icons-blue) 751 (vhdl-ts-mode nerd-icons-octicon "nf-oct-cpu" :face nerd-icons-blue) 752 ;; (haskell-cabal-mode nerd-icons-fileicon "cabal" :face nerd-icons-lblue) 753 (kotlin-mode nerd-icons-sucicon "nf-custom-kotlin" :face nerd-icons-orange) 754 (kotlin-ts-mode nerd-icons-sucicon "nf-custom-kotlin" :face nerd-icons-orange) 755 (nim-mode nerd-icons-sucicon "nf-seti-nim" :face nerd-icons-yellow) 756 (sql-mode nerd-icons-devicon "nf-dev-database" :face nerd-icons-silver) 757 (lua-mode nerd-icons-sucicon "nf-seti-lua" :face nerd-icons-dblue) 758 (lua-ts-mode nerd-icons-sucicon "nf-seti-lua" :face nerd-icons-dblue) 759 ;; (adoc-mode nerd-icons-fileicon "asciidoc" :face nerd-icons-lblue) 760 (puppet-mode nerd-icons-sucicon "nf-custom-puppet" :face nerd-icons-yellow) 761 (jinja2-mode nerd-icons-sucicon "nf-seti-jinja" :face nerd-icons-silver) 762 (powershell-mode nerd-icons-mdicon "nf-md-powershell" :face nerd-icons-blue) 763 (tex-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 764 (latex-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 765 (latex-ts-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 766 (doctex-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 767 ;; Modes provided by AUCTeX 14.1 and higher 768 (TeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 769 (LaTeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 770 (docTeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 771 (ConTeXt-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 772 (AmSTeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 773 (plain-TeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 774 (Texinfo-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 775 (japanese-plain-TeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 776 (japanese-LaTeX-mode nerd-icons-sucicon "nf-seti-tex" :face nerd-icons-lred) 777 (dart-mode nerd-icons-devicon "nf-dev-dart" :face nerd-icons-blue) 778 (fsharp-mode nerd-icons-devicon "nf-dev-fsharp" :face nerd-icons-blue) 779 (asm-mode nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 780 (fasm-mode nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 781 (masm-mode nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 782 (nasm-mode nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 783 (gas-mode nerd-icons-sucicon "nf-seti-asm" :face nerd-icons-blue) 784 ;; (tcl-mode nerd-icons-fileicon "tcl" :face nerd-icons-dred) 785 ;; (cuda-mode nerd-icons-fileicon "nvidia" :face nerd-icons-green) 786 (f90-mode nerd-icons-mdicon "nf-md-language_fortran" :face nerd-icons-purple) 787 ;; (hy-mode nerd-icons-fileicon "hy" :face nerd-icons-blue) 788 (glsl-mode nerd-icons-faicon "nf-fa-paint_brush" :face nerd-icons-green) 789 (zig-mode nerd-icons-sucicon "nf-seti-zig" :face nerd-icons-orange) 790 ;; (odin-mode nerd-icons-fileicon "odin" :face nerd-icons-lblue) 791 (pdf-view-mode nerd-icons-codicon "nf-cod-file_pdf" :face nerd-icons-dred) 792 (doc-view-mode nerd-icons-mdicon "nf-md-file_document" :face nerd-icons-lred) 793 (calibre-library-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-dblue) 794 (calibre-edit-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-lred) 795 (calibredb-search-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-dblue) 796 (calibredb-show-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-lblue) 797 (osm-mode nerd-icons-mdicon "nf-md-map_search" :face nerd-icons-lgreen) 798 (spacemacs-buffer-mode nerd-icons-sucicon "nf-custom-emacs" :face nerd-icons-purple) 799 800 (elfeed-search-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-orange) 801 (elfeed-summary-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-orange) 802 (elfeed-show-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-yellow) 803 (newsticker-treeview-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-orange) 804 (newsticker-treeview-list-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-lorange) 805 (newsticker-treeview-item-mode nerd-icons-faicon "nf-fa-rss_square" :face nerd-icons-yellow) 806 807 (emms-browser-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 808 (emms-lyrics-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 809 (emms-show-all-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 810 (emms-metaplaylist-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 811 (emms-tag-editor-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 812 (emms-playlist-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 813 (lilypond-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-green) 814 (bongo-playlist-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 815 (bongo-library-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 816 (mingus-playlist-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 817 (mingus-help-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 818 (mingus-browse-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 819 (mingus-burn-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 820 (simple-mpc-mode nerd-icons-faicon "nf-fa-music" :face nerd-icons-silver) 821 (telega-root-mode nerd-icons-faicon "nf-fae-telegram" :face nerd-icons-purple) 822 (telega-chat-mode nerd-icons-faicon "nf-fae-telegram" :face nerd-icons-blue) 823 (mastodon-mode nerd-icons-mdicon "nf-md-mastodon" :face nerd-icons-blue) 824 825 (fanyi-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-lcyan) 826 (osx-dictionary-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-lcyan) 827 (youdao-dictionary-mode nerd-icons-codicon "nf-cod-library" :face nerd-icons-lcyan) 828 829 (magik-mode nerd-icons-faicon "nf-fa-magic" :face nerd-icons-blue) 830 (magik-ts-mode nerd-icons-faicon "nf-fa-magic" :face nerd-icons-blue) 831 (magik-session-mode nerd-icons-devicon "nf-dev-terminal" :face nerd-icons-blue) 832 (magik-cb-mode nerd-icons-faicon "nf-fa-book" :face nerd-icons-blue) 833 ;; (meson-mode nerd-icons-fileicon "meson" :face nerd-icons-purple) 834 ;; (man-common nerd-icons-fileicon "man-page" :face nerd-icons-blue) 835 (heex-mode nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lorange) 836 (heex-ts-mode nerd-icons-sucicon "nf-seti-elixir" :face nerd-icons-lorange) 837 (julia-mode nerd-icons-sucicon "nf-seti-julia" :face nerd-icons-purple) 838 (julia-ts-mode nerd-icons-sucicon "nf-seti-julia" :face nerd-icons-purple) 839 (flycheck-error-list nerd-icons-faicon "nf-fa-list_alt" :face nerd-icons-lred))) 840 841 (defvar nerd-icons-url-alist 842 '( 843 ;; Social media and communities 844 ("^\\(https?://\\)?\\(www\\.\\)?del\\.icio\\.us" nerd-icons-faicon "nf-fa-delicious") 845 ("^\\(https?://\\)?\\(www\\.\\)?behance\\.net" nerd-icons-faicon "nf-fa-behance") 846 ("^\\(https?://\\)?\\(www\\.\\)?dribbble\\.com" nerd-icons-faicon "nf-fa-dribbble") 847 ("^\\(https?://\\)?\\(www\\.\\)?facebook\\.com" nerd-icons-faicon "nf-fa-facebook_official") 848 ("^\\(https?://\\)?\\(www\\.\\)?glide\\.me" nerd-icons-faicon "nf-fa-glide_g") 849 ("^\\(https?://\\)?\\(www\\.\\)?plus\\.google\\.com" nerd-icons-faicon "nf-fa-google_plus") 850 ("linkedin\\.com" nerd-icons-faicon "nf-fa-linkedin") 851 ("^\\(https?://\\)?\\(www\\.\\)?ok\\.ru" nerd-icons-faicon "nf-fa-odnoklassniki") 852 ("^\\(https?://\\)?\\(www\\.\\)?reddit\\.com" nerd-icons-faicon "nf-fa-reddit_alien") 853 ("^\\(https?://\\)?\\(www\\.\\)?slack\\.com" nerd-icons-faicon "nf-fa-slack") 854 ("^\\(https?://\\)?\\(www\\.\\)?snapchat\\.com" nerd-icons-faicon "nf-fa-snapchat_ghost") 855 ("^\\(https?://\\)?\\(www\\.\\)?weibo\\.com" nerd-icons-faicon "nf-fa-weibo") 856 ("^\\(https?://\\)?\\(www\\.\\)?twitter\\.com" nerd-icons-faicon "nf-fa-twitter") 857 ;; Blogging 858 ("joomla\\.org" nerd-icons-faicon "nf-fa-joomla") 859 ("^\\(https?://\\)?\\(www\\.\\)?medium\\.com" nerd-icons-faicon "nf-fa-medium") 860 ("tumblr\\.com" nerd-icons-faicon "nf-fa-tumblr") 861 ("^wordpress\\.com" nerd-icons-faicon "nf-fa-wordpress") 862 ;; Programming 863 ("^\\(https?://\\)?\\(www\\.\\)?bitbucket\\.org" nerd-icons-faicon "nf-fa-bitbucket") 864 ("^\\(https?://\\)?\\(www\\.\\)?codepen\\.io" nerd-icons-faicon "nf-fa-codepen") 865 ("^\\(https?://\\)?\\(www\\.\\)?codiepie\\.com" nerd-icons-faicon "nf-fa-codiepie") 866 ("^\\(https?://\\)?\\(www\\.\\)?gist\\.github\\.com" nerd-icons-octicon "nf-oct-logo_gist") 867 ("^\\(https?://\\)?\\(www\\.\\)?github\\.com" nerd-icons-octicon "nf-oct-mark_github") 868 ("^\\(https?://\\)?\\(www\\.\\)?gitlab\\.com" nerd-icons-faicon "nf-fa-gitlab") 869 ("^\\(https?://\\)?\\(www\\.\\)?news\\.ycombinator\\.com" nerd-icons-faicon "nf-fa-hacker_news") 870 ("^\\(https?://\\)?\\(www\\.\\)?jsfiddle\\.net" nerd-icons-faicon "nf-fa-jsfiddle") 871 ("^\\(https?://\\)?\\(www\\.\\)?maxcdn\\.com" nerd-icons-faicon "nf-fa-maxcdn") 872 ("^\\(https?://\\)?\\(www\\.\\)?stackoverflow\\.com" nerd-icons-faicon "nf-fa-stack_overflow") 873 ;; Video 874 ("^\\(https?://\\)?\\(www\\.\\)?twitch\\.tv" nerd-icons-faicon "nf-fa-twitch") 875 ("^\\(https?://\\)?\\(www\\.\\)?vimeo\\.com" nerd-icons-faicon "nf-fa-vimeo") 876 ("^\\(https?://\\)?\\(www\\.\\)?youtube\\.com" nerd-icons-faicon "nf-fa-youtube") 877 ("^\\(https?://\\)?\\(www\\.\\)?youtu\\.be" nerd-icons-faicon "nf-fa-youtube") 878 ("^\\(https?://\\)?\\(www\\.\\)?vine\\.co" nerd-icons-faicon "nf-fa-vine") 879 ;; Sound 880 ("^\\(https?://\\)?\\(www\\.\\)?last\\.fm" nerd-icons-faicon "nf-fa-lastfm") 881 ("^\\(https?://\\)?\\(www\\.\\)?mixcloud\\.com" nerd-icons-faicon "nf-fa-mixcloud") 882 ("^\\(https?://\\)?\\(www\\.\\)?soundcloud\\.com" nerd-icons-faicon "nf-fa-soundcloud") 883 ("spotify\\.com" nerd-icons-faicon "nf-fa-spotify") 884 ;; Shopping 885 ("^\\(https?://\\)?\\(www\\.\\)?amazon\\." nerd-icons-faicon "nf-fa-amazon") 886 ("^\\(https?://\\)?\\(www\\.\\)?opencart\\.com" nerd-icons-faicon "nf-fa-opencart") 887 ("^\\(https?://\\)?\\(www\\.\\)?paypal\\.com" nerd-icons-faicon "nf-fa-paypal") 888 ("^\\(https?://\\)?\\(www\\.\\)?shirtsinbulk\\.com" nerd-icons-faicon "nf-fa-shitsinbulk") 889 ;; Images 890 ("^\\(https?://\\)?\\(www\\.\\)?500px\\.com" nerd-icons-faicon "nf-fa-500px") 891 ("^\\(https?://\\)?\\(www\\.\\)?deviantart\\.com" nerd-icons-faicon "nf-fa-deviantart") 892 ("^\\(https?://\\)?\\(www\\.\\)?flickr\\.com" nerd-icons-faicon "nf-fa-flickr") 893 ("^\\(https?://\\)?\\(www\\.\\)?instagram\\.com" nerd-icons-faicon "nf-fa-instagram") 894 ("^\\(https?://\\)?\\(www\\.\\)?pinterest\\." nerd-icons-faicon "nf-fa-pinterest") 895 ;; Information and books 896 ("^\\(https?://\\)?\\(www\\.\\)?digg\\.com" nerd-icons-faicon "nf-fa-digg") 897 ("^\\(https?://\\)?\\(www\\.\\)?foursquare\\.com" nerd-icons-faicon "nf-fa-foursquare") 898 ("^\\(https?://\\)?\\(www\\.\\)?getpocket\\.com" nerd-icons-faicon "nf-fa-get_pocket") 899 ("^\\(https?://\\)?\\(www\\.\\)?scribd\\.com" nerd-icons-faicon "nf-fa-scribd") 900 ("^\\(https?://\\)?\\(www\\.\\)?slideshare\\.net" nerd-icons-faicon "nf-fa-slideshare") 901 ("stackexchange\\.com" nerd-icons-faicon "nf-fa-stack_exchange") 902 ("^\\(https?://\\)?\\(www\\.\\)?stumbleupon\\.com" nerd-icons-faicon "nf-fa-stumbleupon") 903 ("^\\(https?://\\)?\\(www\\.\\)?tripadvisor\\." nerd-icons-faicon "nf-fa-tripadvisor") 904 ("^\\(https?://\\)?\\(www\\.\\)?yelp\\." nerd-icons-faicon "nf-fa-yelp") 905 906 ("wikipedia\\.org" nerd-icons-faicon "nf-fa-wikipedia_w") 907 ;; Various companies and tools 908 ("^\\(https?://\\)?\\(www\\.\\)?angel\\.co" nerd-icons-faicon "nf-fa-angellist") 909 ("^\\(https?://\\)?\\(www\\.\\)?apple\\.com" nerd-icons-faicon "nf-fa-apple") 910 ("^\\(https?://\\)?\\(www\\.\\)?buysellads\\.com" nerd-icons-faicon "nf-fa-buysellads") 911 ("^\\(https?://\\)?\\(www\\.\\)?connectdevelop\\.com" nerd-icons-faicon "nf-fa-connectdevelop") 912 ("^\\(https?://\\)?\\(www\\.\\)?dashcube\\.com" nerd-icons-faicon "nf-fa-dashcube") 913 ("^\\(https?://\\)?\\(www\\.\\)?dropbox\\.com" nerd-icons-faicon "nf-fa-dropbox") 914 ("^\\(https?://\\)?\\(www\\.\\)?enviragallery\\.com" nerd-icons-faicon "nf-fa-envira") 915 ("^\\(https?://\\)?\\(www\\.\\)?fortawesome\\.com" nerd-icons-faicon "nf-fa-fort_awesome") 916 ("^\\(https?://\\)?\\(www\\.\\)?forumbee\\.com" nerd-icons-faicon "nf-fa-forumbee") 917 ("^\\(https?://\\)?\\(www\\.\\)?gratipay\\.com" nerd-icons-faicon "nf-fa-gratipay") 918 ("^\\(https?://\\)?\\(www\\.\\)?modx\\.com" nerd-icons-faicon "nf-fa-modx") 919 ("^\\(https?://\\)?\\(www\\.\\)?pagelines\\.com" nerd-icons-faicon "nf-fa-pagelines") 920 ("^\\(https?://\\)?\\(www\\.\\)?producthunt\\.com" nerd-icons-faicon "nf-fa-product_hunt") 921 ("sellsy\\.com" nerd-icons-faicon "nf-fa-sellsy") 922 ("^\\(https?://\\)?\\(www\\.\\)?simplybuilt\\.com" nerd-icons-faicon "nf-fa-simplybuilt") 923 ("^\\(https?://\\)?\\(www\\.\\)?skyatlas\\.com" nerd-icons-faicon "nf-fa-skyatlas") 924 ("^\\(https?://\\)?\\(www\\.\\)?skype\\.com" nerd-icons-faicon "nf-fa-skype") 925 ("steampowered\\.com" nerd-icons-faicon "nf-fa-steam") 926 ("^\\(https?://\\)?\\(www\\.\\)?themeisle\\.com" nerd-icons-faicon "nf-fa-themeisle") 927 ("^\\(https?://\\)?\\(www\\.\\)?trello\\.com" nerd-icons-faicon "nf-fa-trello") 928 ("^\\(https?://\\)?\\(www\\.\\)?whatsapp\\.com" nerd-icons-faicon "nf-fa-whatsapp") 929 ("^\\(https?://\\)?\\(www\\.\\)?ycombinator\\.com" nerd-icons-faicon "nf-fa-y_combinator") 930 ("yahoo\\.com" nerd-icons-faicon "nf-fa-yahoo") 931 ("^\\(https?://\\)?\\(www\\.\\)?yoast\\.com" nerd-icons-faicon "nf-fa-yoast") 932 ;; Catch all 933 ("android" nerd-icons-faicon "nf-fa-android") 934 ("creativecommons" nerd-icons-faicon "nf-fa-creative_commons") 935 ("forums?" nerd-icons-codicon "nf-cod-comment_discussion") 936 ("\\.pdf$" nerd-icons-codicon "nf-cod-file_pdf" :face nerd-icons-dred) 937 ("google" nerd-icons-faicon "nf-fa-google") 938 ("\\.rss" nerd-icons-faicon "nf-fa-rss"))) 939 940 (defun nerd-icons-auto-mode-match? (&optional file) 941 "Whether or not FILE's `major-mode' match against its `auto-mode-alist'." 942 (let* ((file (or file (buffer-file-name) (buffer-name))) 943 (auto-mode (nerd-icons-match-to-alist file auto-mode-alist))) 944 (eq major-mode auto-mode))) 945 946 (defun nerd-icons-match-to-alist (file alist) 947 "Match FILE against an entry in ALIST using `string-match'." 948 (cdr (cl-find-if (lambda (it) (string-match (car it) file)) alist))) 949 950 (defun nerd-icons-dir-is-submodule (dir) 951 "Checker whether or not DIR is a git submodule." 952 (let* ((gitmodule-dir (locate-dominating-file dir ".gitmodules")) 953 (modules-file (expand-file-name (format "%s.gitmodules" gitmodule-dir))) 954 (module-search (format "submodule \".*?%s\"" (file-name-base dir)))) 955 956 (when (and gitmodule-dir (file-exists-p (format "%s/.git" dir))) 957 (with-temp-buffer 958 (insert-file-contents modules-file) 959 (search-forward-regexp module-search (point-max) t))))) 960 961 (defun nerd-icons--read-candidates () 962 "Helper to build a list of candidates for all glyph sets." 963 (cl-reduce 'append (mapcar (lambda (it) (nerd-icons--read-candidates-for-glyph-set it t)) nerd-icons-glyph-sets))) 964 965 (defun nerd-icons--read-candidates-for-glyph-set (glyph-set &optional show-glyph-set) 966 "Helper to build read candidates for GLYPH-SET. 967 968 If SHOW-GLYPH-SET is non-nil, displays the icons glyph set in the candidate 969 string." 970 (let ((data (funcall (nerd-icons--data-name glyph-set))) 971 (icon-f (nerd-icons--function-name glyph-set))) 972 (mapcar 973 (lambda (it) 974 (let* ((icon-name (car it)) 975 976 (icon-display (funcall icon-f icon-name)) 977 (icon-glyph-set (if show-glyph-set (format "\t[%s]" glyph-set) "")) 978 979 (candidate-name (format "%s\t%s%s" icon-display icon-name icon-glyph-set)) 980 (candidate-icon (funcall (nerd-icons--function-name glyph-set) icon-name))) 981 (cons candidate-name candidate-icon))) 982 data))) 983 984 ;;;###autoload 985 (defun nerd-icons-install-fonts (&optional pfx) 986 "Helper function to download and install the latests fonts based on OS. 987 The provided Nerd Font is Symbols Nerd Font Mono. 988 When PFX is non-nil, ignore the prompt and just install" 989 (interactive "P") 990 (when (or pfx (yes-or-no-p "This will download and install fonts, are you sure you want to do this?")) 991 (let* ((url-format "https://raw.githubusercontent.com/rainstormstudio/nerd-icons.el/main/fonts/%s") 992 (font-dest (cond 993 ;; Default Linux install directories 994 ((member system-type '(gnu gnu/linux gnu/kfreebsd)) 995 (concat (or (getenv "XDG_DATA_HOME") 996 (concat (getenv "HOME") "/.local/share")) 997 "/fonts/" 998 nerd-icons-fonts-subdirectory)) 999 ;; Default MacOS install directory 1000 ((eq system-type 'darwin) 1001 (concat (getenv "HOME") 1002 "/Library/Fonts/" 1003 nerd-icons-fonts-subdirectory)))) 1004 (known-dest? (stringp font-dest)) 1005 (font-dest (or font-dest (read-directory-name "Font installation directory: " "~/")))) 1006 1007 (unless (file-directory-p font-dest) (mkdir font-dest t)) 1008 1009 (mapc (lambda (font) 1010 (url-copy-file (format url-format font) (expand-file-name font font-dest) t)) 1011 nerd-icons-font-names) 1012 (when known-dest? 1013 (message "Fonts downloaded, updating font cache... <fc-cache -f -v> ") 1014 (shell-command-to-string (format "fc-cache -f -v"))) 1015 (message "%s Successfully %s `nerd-icons' fonts to `%s'!" 1016 (nerd-icons-wicon "nf-weather-stars" :v-adjust 0.0) 1017 (if known-dest? "installed" "downloaded") 1018 font-dest)))) 1019 1020 ;;;###autoload 1021 (defun nerd-icons-insert (&optional arg glyph-set) 1022 "Interactive icon insertion function. 1023 When Prefix ARG is non-nil, insert the propertized icon. 1024 When GLYPH-SET is non-nil, limit the candidates to the icon set matching it." 1025 (interactive "P") 1026 (let* ((standard-output (current-buffer)) 1027 (candidates (if glyph-set 1028 (nerd-icons--read-candidates-for-glyph-set glyph-set) 1029 (nerd-icons--read-candidates))) 1030 (prompt (if glyph-set 1031 (format "%s Icon: " (funcall (nerd-icons--glyph-set-name glyph-set))) 1032 "Icon : ")) 1033 (selection (completing-read prompt candidates nil t)) 1034 (result (cdr (assoc selection candidates)))) 1035 1036 (if arg (prin1 result) (insert result)))) 1037 1038 ;;;###autoload 1039 (defun nerd-icons-icon-for-dir (dir &rest arg-overrides) 1040 "Get the formatted icon for DIR. 1041 ARG-OVERRIDES should be a plist containining `:height', 1042 `:v-adjust' or `:face' properties like in the normal icon 1043 inserting functions." 1044 (let* ((dir (or dir default-directory "/")) 1045 (dirname (file-name-base (directory-file-name dir))) 1046 (path (if (file-name-absolute-p dir) dir (expand-file-name dir))) 1047 (icon (nerd-icons-match-to-alist dirname nerd-icons-dir-icon-alist)) 1048 (args (cdr icon))) 1049 (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) 1050 (cond 1051 ((file-remote-p path) 1052 (apply #'nerd-icons-codicon "nf-cod-remote" (cdr args))) 1053 ((file-symlink-p path) 1054 (apply #'nerd-icons-codicon "nf-cod-file_symlink_directory" (cdr args))) 1055 ((nerd-icons-dir-is-submodule path) 1056 (apply #'nerd-icons-codicon "nf-cod-file_submodule" (cdr args))) 1057 ((file-exists-p (format "%s/.git" path)) 1058 (apply #'nerd-icons-octicon "nf-oct-repo" (cdr args))) 1059 (t (apply (car icon) args))))) 1060 1061 ;;;###autoload 1062 (defun nerd-icons-icon-for-file (file &rest arg-overrides) 1063 "Get the formatted icon for FILE. 1064 ARG-OVERRIDES should be a plist containining `:height', 1065 `:v-adjust' or `:face' properties like in the normal icon 1066 inserting functions." 1067 (let* ((name (file-name-nondirectory file)) 1068 (ext (file-name-extension name)) 1069 (icon (or (nerd-icons-match-to-alist name nerd-icons-regexp-icon-alist) 1070 (and ext 1071 (cdr (assoc (downcase ext) 1072 nerd-icons-extension-icon-alist))) 1073 nerd-icons-default-file-icon)) 1074 (args (cdr icon))) 1075 (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) 1076 (apply (car icon) args))) 1077 1078 ;;;###autoload 1079 (defun nerd-icons-icon-for-extension (ext &rest arg-overrides) 1080 "Get the formatted icon for EXT. 1081 ARG-OVERRIDES should be a plist containining `:height', 1082 `:v-adjust' or `:face' properties like in the normal icon 1083 inserting functions." 1084 (let* ((icon (or 1085 (and ext 1086 (cdr (assoc (downcase ext) 1087 nerd-icons-extension-icon-alist))) 1088 nerd-icons-default-file-icon)) 1089 (args (cdr icon))) 1090 (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) 1091 (apply (car icon) args))) 1092 1093 ;;;###autoload 1094 (defun nerd-icons-icon-for-mode (mode &rest arg-overrides) 1095 "Get the formatted icon for MODE. 1096 ARG-OVERRIDES should be a plist containining `:height', 1097 `:v-adjust' or `:face' properties like in the normal icon 1098 inserting functions." 1099 (let* ((icon (or (cdr (or (assoc mode nerd-icons-mode-icon-alist) 1100 (assoc (get mode 'derived-mode-parent) nerd-icons-mode-icon-alist))) 1101 nerd-icons-default-file-icon)) 1102 (args (cdr icon))) 1103 (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) 1104 (if icon (apply (car icon) args) mode))) 1105 1106 ;;;###autoload 1107 (defun nerd-icons-icon-for-url (url &rest arg-overrides) 1108 "Get the formatted icon for URL. 1109 If an icon for URL isn't found in `nerd-icons-url-alist', a globe is used. 1110 ARG-OVERRIDES should be a plist containining `:height', 1111 `:v-adjust' or `:face' properties like in the normal icon 1112 inserting functions." 1113 (let* ((icon (nerd-icons-match-to-alist url nerd-icons-url-alist)) 1114 (args (cdr icon))) 1115 (unless icon 1116 (setq icon '(nerd-icons-faicon "nf-fa-globe")) 1117 (setq args (cdr icon))) 1118 (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) 1119 (apply (car icon) args))) 1120 1121 ;;;###autoload 1122 (defun nerd-icons-icon-for-buffer () 1123 "Get the formatted icon for the current buffer. 1124 1125 This function prioritises the use of the buffers file extension to 1126 discern the icon when its `major-mode' matches its auto mode, 1127 otherwise it will use the buffers `major-mode' to decide its 1128 icon." 1129 (nerd-icons--icon-info-for-buffer)) 1130 1131 (defun nerd-icons-cache (func) 1132 "Set a cache for FUNC. Does not work on interactive functions." 1133 (unless (get func 'nerd-icons--cached) 1134 (let ((cache (make-hash-table :test #'equal 1135 :size nerd-icons--cache-limit)) 1136 (orig-fn (symbol-function func))) 1137 (fset func 1138 (lambda (&rest args) 1139 (or (gethash args cache) 1140 (progn 1141 (when (> (hash-table-count cache) 1142 nerd-icons--cache-limit) 1143 (clrhash cache)) 1144 (puthash args (apply orig-fn args) cache))))))) 1145 1146 (put func 'nerd-icons--cached t)) 1147 1148 (nerd-icons-cache #'nerd-icons-icon-for-dir) 1149 (nerd-icons-cache #'nerd-icons-icon-for-file) 1150 (nerd-icons-cache #'nerd-icons-icon-for-extension) 1151 (nerd-icons-cache #'nerd-icons-icon-for-mode) 1152 (nerd-icons-cache #'nerd-icons-icon-for-url) 1153 1154 (defun nerd-icons--icon-info-for-buffer (&optional f) 1155 "Get icon info for the current buffer. 1156 When F is provided, the info function is calculated with the format 1157 `nerd-icons-icon-%s-for-file' or `nerd-icons-icon-%s-for-mode'." 1158 (let* ((base-f (concat "nerd-icons-icon" (when f (format "-%s" f)))) 1159 (file-f (intern (concat base-f "-for-file"))) 1160 (mode-f (intern (concat base-f "-for-mode")))) 1161 (if (and (buffer-file-name) 1162 (nerd-icons-auto-mode-match?)) 1163 (funcall file-f (file-name-nondirectory (buffer-file-name))) 1164 (funcall mode-f major-mode)))) 1165 1166 ;; Weather icons 1167 (defun nerd-icons-icon-for-weather (weather) 1168 "Get an icon for a WEATHER status." 1169 (let ((icon (nerd-icons-match-to-alist weather nerd-icons-weather-icon-alist))) 1170 (if icon (apply (car icon) (cdr icon)) weather))) 1171 1172 ;; For `web-mode' 1173 (defun nerd-icons--web-mode-icon (&rest arg-overrides) 1174 "Get icon for a `web-mode' buffer with ARG-OVERRIDES." 1175 (nerd-icons--web-mode arg-overrides)) 1176 (defun nerd-icons--web-mode-icon-family () 1177 "Get icon family for a `web-mode' buffer." 1178 (nerd-icons--web-mode t)) 1179 1180 (defvar web-mode-content-type) ; external 1181 (defun nerd-icons--web-mode (&optional arg-overrides) 1182 "Return icon or FAMILY for `web-mode' based on `web-mode-content-type'. 1183 Providing ARG-OVERRIDES will modify the creation of the icon." 1184 (let ((non-nil-args (cl-reduce (lambda (acc it) (if it (append acc (list it)) acc)) 1185 arg-overrides :initial-value '()))) 1186 (cond 1187 ((equal web-mode-content-type "jsx") 1188 (apply 'nerd-icons-devicon (append '("javascript") non-nil-args))) 1189 ((equal web-mode-content-type "javascript") 1190 (apply 'nerd-icons-devicon (append '("javascript") non-nil-args))) 1191 ((equal web-mode-content-type "json") 1192 (apply 'nerd-icons-devicon (append '("nf-dev-less") non-nil-args))) 1193 ((equal web-mode-content-type "xml") 1194 (apply 'nerd-icons-faicon (append '("nf-fa-file_code_o") non-nil-args))) 1195 ((equal web-mode-content-type "css") 1196 (apply 'nerd-icons-devicon (append '("nf-dev-css3") non-nil-args))) 1197 (t 1198 (apply 'nerd-icons-devicon (append '("nf-dev-html5") non-nil-args)))))) 1199 1200 (eval-and-compile 1201 (defun nerd-icons--function-name (name) 1202 "Get the symbol for an icon function name for icon set NAME." 1203 (intern (concat "nerd-icons-" (downcase (symbol-name name))))) 1204 1205 (defun nerd-icons--family-name (name) 1206 "Get the symbol for an icon family function for icon set NAME." 1207 (intern (concat "nerd-icons-" (downcase (symbol-name name)) "-family"))) 1208 1209 (defun nerd-icons--glyph-set-name (name) 1210 "Get the symbol for an icon glyph set function for icon set NAME." 1211 (intern (concat "nerd-icons-" (downcase (symbol-name name)) "-glyph-set"))) 1212 1213 (defun nerd-icons--data-name (name) 1214 "Get the symbol for an icon family function for icon set NAME." 1215 (intern (concat "nerd-icons-" (downcase (symbol-name name)) "-data"))) 1216 1217 (defun nerd-icons--insert-function-name (name) 1218 "Get the symbol for an icon insert function for icon set NAME." 1219 (intern (concat "nerd-icons-insert-" (downcase (symbol-name name)))))) 1220 1221 (defun nerd-icons-insert-icons-for (family &optional height duration) 1222 "Insert all of the available icons associated with FAMILY. 1223 If a HEIGHT is provided it will render the icons at this height. 1224 This is useful both to see the icons more clearly and to test 1225 different height rendering. If DURATION is provided, it will 1226 pause for DURATION seconds between printing each character." 1227 (let* ((data-f (nerd-icons--data-name family)) 1228 (insert-f (nerd-icons--function-name family)) 1229 1230 (height (or height 1.0)) 1231 (data (funcall data-f))) 1232 (mapc 1233 (lambda (it) 1234 (insert (format "%s - %s\n" (funcall insert-f (car it) :height height) (car it))) 1235 (when duration (sit-for duration))) 1236 data))) 1237 1238 (defun nerd-icons-set-font (&optional font-family frame) 1239 "Modify nerd font charsets to use FONT-FAMILY for FRAME." 1240 (let ((font-f (or font-family nerd-icons-font-family)) 1241 (charsets '((#xe5fa . #xe6b2) ;; Seti-UI + Custom 1242 (#xe700 . #xe7c5) ;; Devicons 1243 (#xf000 . #xf2e0) ;; Font Awesome 1244 (#xe200 . #xe2a9) ;; Font Awesome Extension 1245 (#xf500 . #xfd46) (#xf0001 . #xf1af0) ;; Material Design Icons 1246 (#xe300 . #xe3eb) ;; Weather 1247 (#xf400 . #xf4a8) #x2665 #x26a1 #xf27c ;; Octicons 1248 (#xe0a0 . #xe0a2) (#xe0b0 . #xe0b3) ;; Powerline Symbols 1249 #xe0a3 (#xe0b4 . #xe0c8) (#xe0cc . #xe0d2) #xe0d4 ;; Powerline Extra Symbols 1250 (#x23fb . #x23fe) #x2b58 ;; IEC Power Symbols 1251 (#xf300 . #xf372) ;; Font Logos 1252 (#xe000 . #xe00a) ;; Pomicons 1253 (#xea60 . #xebeb)))) ;; Codicons 1254 (cl-loop for charset in charsets do 1255 (set-fontset-font 1256 (frame-parameter nil 'font) 1257 charset 1258 (font-spec :family font-f 1259 :weight nil 1260 :size nil) 1261 frame 1262 'prepend)))) 1263 1264 (defmacro nerd-icons-define-icon (name alist family glyph-set) 1265 "Macro to generate functions for inserting icons for icon set NAME. 1266 1267 NAME defines is the name of the iconset and will produce a 1268 function of the for `nerd-icon-NAME'. 1269 1270 ALIST is the alist containing maps between icon names and the 1271 UniCode for the character. All of these can be found in the data 1272 directory of this package. 1273 1274 FAMILY is the font family to use for the icons. 1275 GLYPH-SET is the glyph set of the icon." 1276 `(progn 1277 (add-to-list 'nerd-icons-glyph-sets (quote ,name)) 1278 (defun ,(nerd-icons--family-name name) () ,family) 1279 (defun ,(nerd-icons--glyph-set-name name) () ,glyph-set) 1280 (defun ,(nerd-icons--data-name name) () ,alist) 1281 (defun ,(nerd-icons--function-name name) (icon-name &rest args) 1282 (let ((icon (cdr (assoc icon-name ,alist))) 1283 (other-face (when nerd-icons-color-icons (plist-get args :face))) 1284 (height (* nerd-icons-scale-factor (or (plist-get args :height) 1.0))) 1285 (v-adjust (* nerd-icons-scale-factor (or (plist-get args :v-adjust) nerd-icons-default-adjust))) 1286 (family ,family)) 1287 (unless icon 1288 (error "Unable to find icon with name `%s' in icon set `%s'" icon-name (quote ,name))) 1289 (let ((face (if other-face 1290 `(:family ,family :height ,height :inherit ,other-face) 1291 `(:family ,family :height ,height)))) 1292 (propertize icon 1293 'face face 1294 'font-lock-face face 1295 'display `(raise ,v-adjust) 1296 'rear-nonsticky t)))) 1297 (defun ,(nerd-icons--insert-function-name name) (&optional arg) 1298 ,(format "Insert a %s icon at point." glyph-set) 1299 (interactive "P") 1300 (nerd-icons-insert arg (quote ,name))))) 1301 1302 (nerd-icons-define-icon ipsicon nerd-icons/ipsicon-alist nerd-icons-font-family "IEC Power Symbols") 1303 (nerd-icons-define-icon octicon nerd-icons/octicon-alist nerd-icons-font-family "Octicons") 1304 (nerd-icons-define-icon pomicon nerd-icons/pomicon-alist nerd-icons-font-family "Pomicons") 1305 (nerd-icons-define-icon powerline nerd-icons/powerline-alist nerd-icons-font-family "Powerline Symbols") 1306 (nerd-icons-define-icon faicon nerd-icons/faicon-alist nerd-icons-font-family "Font Awesome") 1307 (nerd-icons-define-icon wicon nerd-icons/wicon-alist nerd-icons-font-family "Weather") 1308 (nerd-icons-define-icon sucicon nerd-icons/sucicon-alist nerd-icons-font-family "Seti-UI + Custom") 1309 (nerd-icons-define-icon devicon nerd-icons/devicon-alist nerd-icons-font-family "Devicons") 1310 (nerd-icons-define-icon codicon nerd-icons/codicon-alist nerd-icons-font-family "Codicons") 1311 (nerd-icons-define-icon flicon nerd-icons/flicon-alist nerd-icons-font-family "Font Logos") 1312 (nerd-icons-define-icon mdicon nerd-icons/mdicon-alist nerd-icons-font-family "Material Design Icons") 1313 1314 (provide 'nerd-icons) 1315 ;;; nerd-icons.el ends here