* Added icons for erlang, elixir and lockfile
* Lockfile icon updated
* Added colors for Erlang and elixir
* Added few more color variations and configured colors and file
extensions
* remove erlang and lock, use 1 color for elixir
Co-authored-by: Tharindu Abeydeera <tharindu.a@vizuamatix.com>
Co-authored-by: NRK <nrk@disroot.org>
a lot of the extension use the same icon. this can be exploited via
having an array with all the unique icons and then storing a single byte
index into the unique array.
when using `O_EMOJI` this results in around ~1.7KiB drop in the total
table size. `O_NERD` and `O_ICONS` get roughly ~0.5KiB savings.
This pretty much reworks the entire icon system. Some notable changes:
* The extensions are put into a statically generated hash-table instead
of a sorted array. We use Robin-Hood insertion to reduce the max probe
length. Currently we need to probe only 2 slots for `O_EMOJI` and only
3 for `O_NERD`/`O_ICONS`.
* I've opted not to use a perfect-hash since the perfect hashes
generated by [`gperf`](https://www.gnu.org/software/gperf) used some
huge lookup table. The hash function also wasn't as minimal as I'd
like.
* Colors are now using X-Macros. This should speed up startup since we
don't have to search `icons_ext` linearly to find unique colors.
* The hash-table generator outputs a more space optimized `struct
icon_pair` using a char array instead of char pointer. This brings
down the binary size from `145KiB` when using `O_NERD` down to
`137KiB`.
* Some unnecessary duplication and indirection has been reduced by using
the `ICON_STR()` macro.
reduces some unncessary code. and when initializing larger objects,
compilers (gcc and clang at least) typically tend to compile it down to
a memset anyways.
anything not explicitly initialized will be implicitly initialized to
zero. this makes things more robust since comments are not checked by
the compiler and can be incorrect.