2023-02-28 07:13:56 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
2024-02-21 03:15:18 +00:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2023-02-28 07:13:56 +00:00
|
|
|
cfg = config.vim.binds.whichKey;
|
|
|
|
in {
|
2024-07-08 21:57:58 +00:00
|
|
|
config = mkIf cfg.enable {
|
2024-11-08 10:22:50 +00:00
|
|
|
vim = {
|
|
|
|
startPlugins = ["which-key"];
|
2023-02-28 07:13:56 +00:00
|
|
|
|
2024-11-08 10:22:50 +00:00
|
|
|
pluginRC.whichkey = entryAnywhere ''
|
|
|
|
local wk = require("which-key")
|
|
|
|
wk.setup (${toLuaObject cfg.setupOpts})
|
|
|
|
wk.register(${toLuaObject cfg.register})
|
|
|
|
'';
|
|
|
|
};
|
2023-02-28 07:13:56 +00:00
|
|
|
};
|
|
|
|
}
|