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