plugins: use mkMappingOption instead of mkOption where possible

This commit is contained in:
alfarel 2026-03-14 22:19:58 -04:00
commit 5e1ee37e7f
No known key found for this signature in database
9 changed files with 113 additions and 411 deletions

View file

@ -1,38 +1,22 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr str;
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
inherit (config.vim.lib) mkMappingOption;
in {
options.vim.utility.motion.flash-nvim = {
enable = mkEnableOption "enhanced code navigation with flash.nvim";
setupOpts = mkPluginSetupOption "flash-nvim" {};
mappings = {
jump = mkOption {
type = nullOr str;
default = "s";
description = "Jump";
};
treesitter = mkOption {
type = nullOr str;
default = "S";
description = "Treesitter";
};
remote = mkOption {
type = nullOr str;
default = "r";
description = "Remote Flash";
};
treesitter_search = mkOption {
type = nullOr str;
default = "R";
description = "Treesitter Search";
};
toggle = mkOption {
type = nullOr str;
default = "<c-s>";
description = "Toggle Flash Search";
};
jump = mkMappingOption "Jump" "s";
treesitter = mkMappingOption "Treesitter" "S";
remote = mkMappingOption "Remote Flash" "r";
treesitter_search = mkMappingOption "Treesitter Search" "R";
toggle = mkMappingOption "Toggle Flash Search" "<c-s>";
};
};
}