1
0
Fork 0
mirror of https://github.com/NotAShelf/neovim-flake.git synced 2024-12-28 08:29:48 +01:00
neovim-flake/modules/plugins/utility/binds/which-key/which-key.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

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;
in {
options.vim.binds.whichKey = {
enable = mkEnableOption "which-key keybind helper menu";
register = mkOption {
2024-06-12 01:24:03 +02:00
type = attrsOf (nullOr str);
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";
};
};
};
};
}