dotfiles/modules/programs/nvim/default.nix

39 lines
897 B
Nix

{ config, lib, pkgs, inputs, ... }:
let
inherit (lib) mkEnableOption mkIf readFile;
cfg = config.my.programs.nvim;
in
{
imports = lib.my.listModulesRec ./new_plugins;
options.my.programs.nvim.enable = mkEnableOption "nvim";
config = mkIf cfg.enable {
home-manager.users.moritz = {
home.packages = with pkgs; [
xdotool # for vimtex
];
programs.nixvim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
vimAlias = true;
extraConfigLuaPre = readFile ./options.lua;
luaLoader.enable = true;
performance = {
byteCompileLua = {
enable = true;
configs = true;
initLua = true;
nvimRuntime = true;
plugins = true;
};
combinePlugins.enable = true;
};
};
};
};
}