|
2 | 2 |
|
3 | 3 | Thank you for your contribution!
|
4 | 4 |
|
5 |
| -## Quick: Add/Change An Icon |
6 |
| - |
7 |
| -1. Copy or modify a line in `icons-default.lua` and set: |
8 |
| - - `icon` |
9 |
| - - `color` (dark) |
10 |
| - - `name` |
11 |
| -1. Run `make` to: |
12 |
| - - generate `cterm_color` |
13 |
| - - format/order/normalise `icons-default.lua` |
14 |
| - - generate `icons-light.lua` |
15 |
| -1. Commit both `icons-default.lua` and `icons-default.lua` |
| 5 | +## Order |
| 6 | + |
| 7 | +Please ensure `icons_by_filename`, `icons_by_file_extension`, `icons_by_operating_system`, `icons_by_desktop_environment`, |
| 8 | +`icons_by_window_manager` and `filetypes` are ordered alphabetically, to prevent merge conflicts. |
16 | 9 |
|
17 | 10 | ## Prerequisites
|
18 | 11 |
|
@@ -73,27 +66,24 @@ Add the icon to table **3.**, **4.**, **5.** if the icon is from an OS, DE or WM
|
73 | 66 | Each icon must have the following structure (this is an example):
|
74 | 67 |
|
75 | 68 | ```lua
|
76 |
| - ["lua"] = { icon = "", color = "#51A0CF", cterm_color = "74", name = "Lua" }, |
| 69 | +[".gitconfig"] = { |
| 70 | + icon = "", |
| 71 | + color = "#41535b", |
| 72 | + cterm_color = "0", |
| 73 | + name = "GitConfig", |
| 74 | +}, |
77 | 75 | ```
|
78 | 76 |
|
79 |
| -> [!IMPORTANT] |
80 |
| -> If the icon you need is not available on Nerd Fonts you first need to make a |
81 |
| -> PR to a project that feeds glyphs to Nerd Fonts. Probably the most adequate |
82 |
| -> project to contribute is <https://github.com/devicons/devicon>. |
83 |
| -> Take into account that **months** can pass before the icon is available on the |
84 |
| -> Nerd Fonts project, once there feel free to open a PR on this project. |
85 |
| -
|
86 | 77 | ***Key/value pairs must appear in the same exact order!***
|
87 | 78 |
|
88 | 79 | - `color` must contain a color in the html notation
|
89 |
| -- `cterm_color` must contain a number (any number) |
| 80 | +- `cterm_color` must be below `color`, and it must contain a number (any number) |
90 | 81 | - the correct value for `cterm_color` will be generated by the script
|
91 | 82 | - `name` must only contain alphanumeric characters (don't use `/`, `-`, `_`)
|
92 | 83 |
|
93 | 84 | Ensure your current working directory is the repo root. Run `make`. This will:
|
94 | 85 |
|
95 | 86 | - Update `cterm_color` based on `color`
|
96 |
| -- Format/order/normalise `lua/nvim-web-devicons/icons-default.lua` |
97 | 87 | - Generate `lua/nvim-web-devicons/icons-light.lua`
|
98 | 88 |
|
99 | 89 | Please commit both `lua/nvim-web-devicons/icons-default.lua` and `lua/nvim-web-devicons/icons-light.lua`
|
@@ -150,9 +140,9 @@ See also [The Conventional Commits ultimate cheatsheet](https://gist.github.com/
|
150 | 140 |
|
151 | 141 | ## Browser Font
|
152 | 142 |
|
153 |
| -It is useful to see the actual glyphs in the pull request. That can be done by setting the browser font to your Nerd Font. |
| 143 | +It is useful to see the actual glyphs in the pull request. That can be done by setting the browser font to your nerd font. |
154 | 144 |
|
155 |
| -Using Firefox: |
| 145 | +Using firefox: |
156 | 146 |
|
157 | 147 | - Settings -> General
|
158 | 148 | - Fonts -> Advanced
|
|
0 commit comments