kat.nvim
kat.nvim copied to clipboard
Easily accesible color module
For #16
Easy color access is to be addressed with this. The general idea is to expose a general list of colors, on demand, only using the main colors.fnl file. This will let end users to more easily add support for various plugins and the like.
Decided on more explicit information at the cost of verbosity. Each predefined color table contains tables of the exported colors. For instance, to access the base pink color from this theme you would do:
local colors = require('katdotnvim.utils.export.colors')
print(colors.kat.pink.base.color)
This, of course, comes with a lot more verbosity but it allows me to add a key called desc
to the table that gives a far more informative about the color in question. And of course you can assign a different variable to whatever internal color
local pink = require('katdotnivm.utils.export.colors').kat.pink
print(pink.base.desc) -- prints "base color"
I cannot think of a better way to provide clear information to end users
I added most of the colors used in my colorscheme finally. Should finally be nearing for release after all this time
The exportable colors have been moved from katdotnvim.utils.export.colors
to katdotnvim.color
. I will, in a later PR, move all colors to take basis on this updated file format. It is outside the scope of this PR
Docs are the last thing needed