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

31 lines
588 B
Nix
Raw Normal View History

2024-05-21 14:53:46 -07:00
{
config,
pkgs,
lib,
...
}:
let
2024-10-20 11:51:39 -07:00
cfg = config.programs.neovim.rose-pine;
enable = cfg.enable && config.programs.neovim.enable;
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
'';
}
];
};
}