nix-config/modules/home-manager/nvim/zk.nix
2025-02-27 16:34:45 +01:00

39 lines
782 B
Nix

{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.user.nvim.enable {
programs.nixvim = {
plugins.zk.enable = true;
plugins.which-key.settings.spec = [
{
__unkeyed-1 = "<leader>z";
group = "+zk";
}
];
keymaps = [
{
action = ":ZkNewFromTitleSelection<CR>";
key = "<leader>zn";
mode = "v";
options = {
silent = true;
desc = "New zk note with title from selection";
};
}
{
action = ":ZkaMatch<CR>";
key = "<leader>zs";
mode = "v";
options = {
silent = true;
desc = "Search zk notes from selection";
};
}
];
};
};
}