# Lf — terminal file manager with bat preview and Dracula theme.
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; let
  cfg = config.base.cliTools.lf;
in {
  # Enabled by default — base modules are always-on.
  options.base.cliTools.lf.enable = (mkEnableOption "enable lf terminal file manager") // {default = true;};

  config = mkIf cfg.enable {
    home.packages = [pkgs.lf];

    programs.lf = {
      enable = true;
      settings = {
        preview = true;
        drawbox = true;
        hidden = true;
        icons = true;
        previewer = "bat";
      };
    };
  };
}
