colorscheme: Add capability to include schemes by JoeKar · Pull Request #2844 · micro-editor/micro (original) (raw)
I was already wondering, why the default color scheme default.micro file tries to track the same content as the as default defined monokai.micro. This becomes even worse when I had a look into the diff of both files:
Since this causes duplicated maintenance effort and is error prone I decide to change the approach.
The easiest way would be to use symbolic links, but they aren't supported by the embed.FS, which is most probably the reason for the duplication of the content. With the introduction of the include support in the color schemes the same result can be achieved. Additionally it's still a reduction of space used within the binary, the maintenance effort decreases, already existing schemes can be extended/slightly adapted and the default theme can be changed by changing the name of the included scheme only.