utility/binds/which-key: changing to the new spec

This commit is contained in:
Soliprem 2024-11-10 02:06:46 +01:00
commit ba8c0ea303
2 changed files with 5 additions and 1 deletions

View file

@ -5,9 +5,12 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.binds.whichKey;
register = mapAttrsToList (n: v: mkLuaInline "{ '${n}', desc = '${v}' }") cfg.register;
in {
config = mkIf cfg.enable {
vim = {
@ -16,7 +19,7 @@ in {
pluginRC.whichkey = entryAnywhere ''
local wk = require("which-key")
wk.setup (${toLuaObject cfg.setupOpts})
wk.register(${toLuaObject cfg.register})
wk.add(${toLuaObject register})
'';
};
};