Closed Arnau478 closed 4 months ago
With the new concept of parsers, palettes where introduced, which makes this much easier and cleaner. The palette is hardcoded, however. So we just need to add a way to change the palette from the config. The problem is that involves a more advanced config parsing method that allows nested struct literals.
Maybe we can use zon_get_fields for parse the config file.
Looks good. I don't love the idea adding a dependency though. But I guess we can make an exception, as that's a temporary solution (we'll use std as soon as possible). If that ends up being the approach we take, I'll create an issue to stop using it, and wait for std support there.
Right now, the color is hardcoded to yellow. It would be wise to allow the user to change this with a flag.
We should keep in mind how ANSI colors work. We might want the flag value to either be a color name (e.g.
red
) or a hex color. The first case would use color codes likeESC[33m
while the latter would use ANSI truecolor.We could of course implement some sort of truecolor detection, but that seems a bit overkill. Although I wanted to do something like that to set the
--color
default (#7)