dotfiles/modules/programs/nvim/default.nix

67 lines
1.5 KiB
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 = {
xdg.configFile."nvim/snippets" = {
recursive = true;
source = ./plugins/snippets;
};
home.packages = with pkgs; [
xdotool # for vimtex
];
# programs.neovim = {
# extraPackages = with pkgs;
# [
# alejandra
# checkmake
# codespell
# deadnix
# dotenv-linter
# fish
# jq
# nil
# nixd
# nixpkgs-fmt
# nodePackages.bash-language-server
# python3Packages.python-lsp-server
# shellcheck
# shfmt
# stable.yamlfix
# statix
# taplo
# yamllint
# ];
# };
programs.nixvim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
vimAlias = true;
extraConfigLuaPre = readFile ./options.lua;
performance = {
byteCompileLua = {
enable = true;
configs = true;
initLua = true;
nvimRuntime = true;
plugins = true;
};
combinePlugins.enable = true;
};
};
};
};
}