mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 19:40:06 +02:00
plugins/misc: adapt to new maps options
This commit is contained in:
parent
574fb73258
commit
dd6a114e52
18 changed files with 262 additions and 193 deletions
|
@ -52,25 +52,25 @@ in {
|
|||
// cfg.extraOptions;
|
||||
|
||||
mappings =
|
||||
mapAttrs'
|
||||
(motion: key: {
|
||||
name = key;
|
||||
value = {
|
||||
mapAttrsToList
|
||||
(
|
||||
motion: key: {
|
||||
mode = ["n" "o" "x"];
|
||||
inherit key;
|
||||
action = "function() require('spider').motion('${motion}') end";
|
||||
lua = true;
|
||||
inherit (cfg.keymaps) silent;
|
||||
desc = "Spider-${motion}";
|
||||
};
|
||||
})
|
||||
options = {
|
||||
inherit (cfg.keymaps) silent;
|
||||
desc = "Spider-${motion}";
|
||||
};
|
||||
}
|
||||
)
|
||||
cfg.keymaps.motions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
maps =
|
||||
genAttrs
|
||||
["normal" "operator" "visualOnly"]
|
||||
(mode: mappings);
|
||||
keymaps = mappings;
|
||||
|
||||
extraConfigLua = ''
|
||||
require("${pluginName}").setup(${helpers.toLuaObject setupOptions})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue