neovim-flake/modules/plugins/utility/binds/which-key/config.nix

24 lines
463 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.binds.whichKey;
in {
config = mkIf cfg.enable {
2024-11-08 11:22:50 +01:00
vim = {
startPlugins = ["which-key"];
2024-11-08 11:22:50 +01:00
pluginRC.whichkey = entryAnywhere ''
local wk = require("which-key")
wk.setup (${toLuaObject cfg.setupOpts})
wk.register(${toLuaObject cfg.register})
'';
};
};
}