feat(home-manager): add support for neovim (#27)

This commit is contained in:
seth 2023-04-17 22:51:53 -04:00 committed by GitHub
parent 12733d64c3
commit 20a4a5d3f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View file

@ -11,6 +11,7 @@ in {
./starship.nix
./helix.nix
./gtk.nix
./neovim.nix
./polybar.nix
./sway.nix
./tmux.nix

View file

@ -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
'';
}
];
};
}