mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 05:40:44 +00:00
25 lines
448 B
Nix
25 lines
448 B
Nix
|
{
|
||
|
pkgs,
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
with lib;
|
||
|
with builtins; let
|
||
|
cfg = config.vim.keys;
|
||
|
in {
|
||
|
options.vim.keys = {
|
||
|
enable = mkEnableOption "key binding plugins";
|
||
|
|
||
|
whichKey = {
|
||
|
enable = mkEnableOption "which-key menu";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf (cfg.enable && cfg.whichKey.enable) {
|
||
|
vim.startPlugins = ["which-key"];
|
||
|
|
||
|
vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''local wk = require("which-key").setup {}'';
|
||
|
};
|
||
|
}
|