37 lines
709 B
Nix
37 lines
709 B
Nix
|
{
|
||
|
lib,
|
||
|
config,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
lib.mkIf (lib.elem "nvim::which-key" config.machine.pkgs) {
|
||
|
programs.nvim-lazy.lazyPlugins = [
|
||
|
{
|
||
|
dir = vPlug: vPlug.which-key-nvim;
|
||
|
event = [ "VeryLazy" ];
|
||
|
keys = [
|
||
|
{
|
||
|
bind = "<leader>?";
|
||
|
cmdIsFunction = true;
|
||
|
cmd = # lua
|
||
|
''
|
||
|
function()
|
||
|
require("which-key").show({ global = false })
|
||
|
end
|
||
|
'';
|
||
|
opts = {
|
||
|
desc = "Buffer Local Keymaps (which-key)";
|
||
|
};
|
||
|
}
|
||
|
];
|
||
|
init = # lua
|
||
|
''
|
||
|
function()
|
||
|
vim.o.timeout = off
|
||
|
vim.o.ttimeout = off
|
||
|
end
|
||
|
'';
|
||
|
}
|
||
|
];
|
||
|
}
|