Skip to content

Commit

Permalink
feat(home-manager): add support for neovim (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo authored Apr 18, 2023
1 parent 12733d6 commit 20a4a5d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in {
./starship.nix
./helix.nix
./gtk.nix
./neovim.nix
./polybar.nix
./sway.nix
./tmux.nix
Expand Down
29 changes: 29 additions & 0 deletions modules/home-manager/neovim.nix
Original file line number Diff line number Diff line change
@@ -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
'';
}
];
};
}

0 comments on commit 20a4a5d

Please sign in to comment.