-
Stylix is a nix module that enables systemwide colorscheme synching, and offers colortheme setting for neovim. It does this by adding mini.base16 to local plugins in the home-manager configuration module. I was wondering what would be the right way to interface with my own nixcats. In the packageDefinitions, configDirName would need to be set to I don't need to do this, but it could be nice to have the option to do so. There is a backend that also uses base16.nvim Here is the module in question; https://github.com/danth/stylix/blob/master/modules/neovim/hm.nix |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
You can pass the list of colors from config.stylix straight through packageDefinitions and access them in lua via the nixCats plugin. You can then provide those straight to mini.base16 The list stylix provides though does not have # at the start of the color number though so you will want to map that on in nix before passing it. (You could do it in Lua too but then that has runtime cost) I can give a more complete answer in a couple hours or tomorrow with some code when I have a computer, but hopefully that can get you started? I don't use stylix personally but I've walked someone through this on discord, when I have a computer at hand I can give more info. |
Beta Was this translation helpful? Give feedback.
Well, to help others and maybe get you started, the nix side looks something like this:
And then you can just grab them as a lua table. You can pass it straight to mini.base16 or some other base16 color plugin
Now, obviously if your nixCats is a separate flake from your main repo you might not have access to this config variable in your flake.
However you can override i…