nixeovim/modules/plugins/theme/catppuccin.nix

34 lines
738 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.plugins.theme.catppuccin; in
{
options.plugins.theme.catppuccin = with lib; {
enable = mkEnableOption "catppuccin";
package = mkPackageOption pkgs.vimPlugins "catppuccin-nvim" { };
settings = mkOption {
type = types.attrs;
default = { };
description = ''
See: https://github.com/catppuccin/nvim/?tab=readme-ov-file#configuration
'';
example = {
flavour = "frappe";
};
};
};
config = lib.mkIf cfg.enable {
plugin.catppuccin-nvim = {
name = "catppuccin";
package = cfg.package;
setupSettings = cfg.settings;
};
vim.namedCmd.colorscheme = ''
colorscheme catppuccin
'';
};
}