{
  lib,
  config,
  pkgs,
  ...
}: let
  cfg = config.shell.neovim;
in {
  options = {
    shell.neovim.enable = lib.mkEnableOption "neovim";
  };

  config = lib.mkIf cfg.enable {
    home.packages = with pkgs; [neovim];
    home.sessionVariables = {
      EDITOR = "${pkgs.neovim}/bin/nvim";
    };
  };
}
