cheatsheet: lazy load

This commit is contained in:
Ching Pei Yang 2024-09-30 21:59:00 +02:00 committed by Ching Pei Yang
parent bb2b3ff225
commit 127ae0200d
No known key found for this signature in database
GPG key ID: 062FBBCE1D0C5DD9

View file

@ -4,15 +4,20 @@
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.strings) optionalString;
cfg = config.vim.binds.cheatsheet;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["cheatsheet-nvim"];
vim.lazy.plugins = [
{
package = "cheatsheet-nvim";
setupModule = "cheatsheet";
setupOpts = {};
cmd = ["Cheatsheet" "CheatsheetEdit"];
vim.pluginRC.cheaetsheet-nvim = entryAnywhere ''
require('cheatsheet').setup({})
'';
before = optionalString config.vim.lazy.enable "require('lz.n').trigger_load('telescope')";
}
];
};
}