{ config, lib, pkgs, inputs, ... }:

let
  inherit (lib) mkEnableOption mkIf readFile;
in
{
  home-manager.users.moritz.programs.nixvim = {
    plugins.treesitter = {
      enable = true;
      folding = true;
      nixvimInjections = true;
      settings.indent.enable = true;
      settings.highlight.enable = true;
      settings.incremental_selection = {
        enable = true;
        keymaps.init_selection = "gn";
        keymaps.node_decremental = "gp";
        keymaps.node_incremental = "gn";
      };
      lazyLoad.settings.event = [ "DeferredUIEnter" ];
    };
    performance.combinePlugins.standalonePlugins = [
      "nvim-treesitter"
    ];
  };
}
