2024-11-08 11:22:50 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.options) mkOption mkEnableOption;
|
|
|
|
inherit (lib.types) attrsOf nullOr str attrs enum bool;
|
|
|
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
2023-11-07 01:50:27 +01:00
|
|
|
in {
|
2023-02-28 08:13:56 +01:00
|
|
|
options.vim.binds.whichKey = {
|
2023-06-05 22:10:25 +02:00
|
|
|
enable = mkEnableOption "which-key keybind helper menu";
|
2024-02-21 04:15:18 +01:00
|
|
|
register = mkOption {
|
2024-06-12 01:24:03 +02:00
|
|
|
type = attrsOf (nullOr str);
|
2024-02-21 04:15:18 +01:00
|
|
|
default = {};
|
2024-11-08 11:22:50 +01:00
|
|
|
description = "Register label for which-key keybind helper menu";
|
|
|
|
};
|
|
|
|
|
|
|
|
setupOpts = mkPluginSetupOption "which-key" {
|
|
|
|
preset = mkOption {
|
|
|
|
type = enum ["classic" "modern" "helix"];
|
|
|
|
default = "modern";
|
|
|
|
description = "The default preset for the which-key window";
|
|
|
|
};
|
|
|
|
|
|
|
|
notify = mkOption {
|
|
|
|
type = bool;
|
|
|
|
default = true;
|
|
|
|
description = "Show a warning when issues were detected with mappings";
|
|
|
|
};
|
|
|
|
|
|
|
|
replace = mkOption {
|
|
|
|
type = attrs;
|
|
|
|
default = {
|
|
|
|
"<space>" = "SPACE";
|
|
|
|
"<leader>" = "SPACE";
|
|
|
|
"<cr>" = "RETURN";
|
|
|
|
"<tab>" = "TAB";
|
|
|
|
};
|
|
|
|
description = "Functions/Lua Patterns for formatting the labels";
|
|
|
|
};
|
|
|
|
|
|
|
|
win = {
|
|
|
|
border = mkOption {
|
|
|
|
type = str;
|
|
|
|
default = config.vim.ui.borders.plugins.which-key.style;
|
|
|
|
description = "Which-key window border style";
|
|
|
|
};
|
|
|
|
};
|
2024-02-21 04:15:18 +01:00
|
|
|
};
|
2023-02-28 08:13:56 +01:00
|
|
|
};
|
|
|
|
}
|