nix/home-manager/common/software/cli/neovim/default.nix
2024-02-07 13:58:55 +09:00

38 lines
842 B
Nix

{config, pkgs, ... }: {
programs.neovim = {
package = pkgs.neovim-unwrapped;
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
nvchad
];
};
# nvchad requires gcc, npm, and unzip
home.packages = [
pkgs.gcc
pkgs.unzip
pkgs.nodejs_20
pkgs.ripgrep
pkgs.fd
pkgs.lazygit
];
# Link the nvchad files to my homedir
# https://mipmip.github.io/home-manager-option-search/?query=xdg.dataFile
xdg.configFile."nvim" = {
enable = true;
recursive = true;
source = "${pkgs.vimPlugins.nvchad}/";
target = "./nvim";
};
xdg.configFile."nvim-custom-plugins" = {
enable = true;
target = "./nvim/lua/custom/plugins.lua";
text = builtins.readFile ./custom/plugins.lua;
};
}