diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index ee73928..db38602 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -11,6 +11,7 @@ in { ./starship.nix ./helix.nix ./gtk.nix + ./neovim.nix ./polybar.nix ./sway.nix ./tmux.nix diff --git a/modules/home-manager/neovim.nix b/modules/home-manager/neovim.nix new file mode 100644 index 0000000..84d5fed --- /dev/null +++ b/modules/home-manager/neovim.nix @@ -0,0 +1,29 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.programs.neovim.catppuccin; +in +{ + options.programs.neovim.catppuccin = lib.ctp.mkCatppuccinOpt "neovim" config; + + config.programs.neovim = with lib; mkIf cfg.enable { + plugins = with pkgs.vimPlugins; [ + { + plugin = catppuccin-nvim; + config = '' + lua << EOF + local compile_path = vim.fn.stdpath("cache") .. "/catppuccin-nvim" + vim.fn.mkdir(compile_path, "p") + vim.opt.runtimepath:append(compile_path) + + require("catppuccin").setup({ + compile_path = compile_path, + flavour = "${cfg.flavour}", + }) + + vim.api.nvim_command("colorscheme catppuccin") + EOF + ''; + } + ]; + }; +}