2025-01-17 20:00:20 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2025-01-19 09:15:51 +00:00
|
|
|
inherit (lib.options) mkEnableOption mkOption;
|
|
|
|
inherit (lib.types) int str;
|
|
|
|
inherit (lib.nvim.types) mkPluginSetupOption borderType;
|
|
|
|
|
|
|
|
mkNotifyOpt = name: duration: hl_group: {
|
|
|
|
duration = mkOption {
|
|
|
|
type = int;
|
|
|
|
default = duration;
|
|
|
|
description = "The duration of the ${name} notification";
|
|
|
|
};
|
|
|
|
hl_group = mkOption {
|
|
|
|
type = str;
|
|
|
|
default = hl_group;
|
|
|
|
description = "The highlight group of the ${name} notification";
|
|
|
|
};
|
|
|
|
};
|
2025-01-17 20:00:20 +00:00
|
|
|
in {
|
|
|
|
options.vim.mini.notify = {
|
|
|
|
enable = mkEnableOption "mini.notify";
|
2025-01-19 09:15:51 +00:00
|
|
|
setupOpts = mkPluginSetupOption "mini.notify" {
|
|
|
|
window.config.border = mkOption {
|
|
|
|
type = borderType;
|
|
|
|
default = config.vim.ui.borders.globalStyle;
|
|
|
|
description = "The border type for the mini.notify-notifications";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
notifyOpts = mkPluginSetupOption "mini.notify notifications" {
|
|
|
|
ERROR = mkNotifyOpt "error" 5000 "DiagnosticError";
|
|
|
|
WARN = mkNotifyOpt "warn" 5000 "DiagnosticWarn";
|
|
|
|
INFO = mkNotifyOpt "info" 5000 "DiagnosticInfo";
|
|
|
|
DEBUG = mkNotifyOpt "debug" 0 "DiagnosticHint";
|
|
|
|
TRACE = mkNotifyOpt "trace" 0 "DiagnosticOk";
|
|
|
|
OFF = mkNotifyOpt "off" 0 "MiniNotifyNormal";
|
|
|
|
};
|
2025-01-17 20:00:20 +00:00
|
|
|
};
|
|
|
|
}
|