nixeovim/modules/plugins/theme/catppuccin.nix

35 lines
738 B
Nix
Raw Permalink Normal View History

2024-04-26 02:08:23 +03:00
{ 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
'';
};
}