<commit_before>{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.programs.neovim;

  runtime' = filter (f: f.enable) (attrValues cfg.runtime);

  runtime = pkgs.linkFarm "neovim-runtime" (map (x: { name = x.target; path = x.source; }) runtime');

in {
  options.programs.neovim = {
    enable = mkEnableOption (lib.mdDoc "Neovim");

    defaultEditor = mkOption {
      type = types.bool;
      default = false;
      description = lib.mdDoc ''
        When enabled, installs neovim and configures neovim to be the default editor
        using the EDITOR environment variable.
      '';
    };

    viAlias = mkOption {
      type = types.bool;
      default = false;
      description = lib.mdDoc ''
        Symlink {command}`vi` to {command}`nvim` binary.
      '';
    };<commit_msg>nixos/neovim: add note about not loading init.vim<commit_after>{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.programs.neovim;

  runtime' = filter (f: f.enable) (attrValues cfg.runtime);

  runtime = pkgs.linkFarm "neovim-runtime" (map (x: { name = x.target; path = x.source; }) runtime');

in {
  options.programs.neovim = {
    enable = mkOption {
      type = types.bool;
      default = false;
      example = true;
      description = lib.mdDoc ''
        Whether to enable Neovim.

        When enabled through this option, Neovim is wrapped to use a
        configuration managed by this module. The configuration file in the
        user's home directory at {file}`~/.config/nvim/init.vim` is no longer
        loaded by default.
      '';
    };

    defaultEditor = mkOption {
      type = types.bool;
      default = false;
      description = lib.mdDoc ''
        When enabled, installs neovim and configures neovim to be the default editor
        using the EDITOR environment variable.
      '';
    };

    viAlias = mkOption {
      type = types.bool;
      default = false;
      description = lib.mdDoc ''
        Symlink {command}`vi` to {command}`nvim` binary.
      '';
    };
{'fraction_non_alphanumeric': 0.11620947630922693, 'fraction_numerical': 0.0, 'mean_word_length': 2.3942470389170896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4802988', 'n_tokens_mistral': 629, 'n_tokens_neox': 621, 'n_words': 186}