rose-pine-nix/modules/home-manager/neovim.nix

29 lines
586 B
Nix
Raw Normal View History

2024-05-21 14:53:46 -07:00
{
config,
pkgs,
lib,
...
2024-10-20 11:51:39 -07:00
}: let
cfg = config.programs.neovim.rose-pine;
enable = cfg.enable && config.programs.neovim.enable;
2024-10-20 11:51:39 -07:00
in {
options.programs.neovim.rose-pine = lib.rp.mkRosePineOpt {name = "neovim";};
config.programs.neovim = lib.mkIf enable {
plugins = with pkgs.vimPlugins; [
{
2024-10-20 11:51:39 -07:00
plugin = rose-pine;
config = ''
lua << EOF
2024-10-20 11:51:39 -07:00
require("rose-pine").setup({
variant = "${cfg.flavor}",
})
2024-10-20 11:51:39 -07:00
vim.api.nvim_command("colorscheme rose-pine")
EOF
'';
}
];
};
}