diff --git a/configs/home-manager/zk.nix b/configs/home-manager/zk.nix index dcecfac..8fbf4f6 100644 --- a/configs/home-manager/zk.nix +++ b/configs/home-manager/zk.nix @@ -27,7 +27,7 @@ bl = ''zk list --link-to $@''; i = ''zk edit --interactive''; unlinked-mentions = ''zk list --mentioned-by $1 --no-linked-by $1''; - wc = ''zk list --format '{{word-count}}\t{{title}}' --sort word-count $@''; + short = ''zk list --format '{{word-count}}\t{{title}}' --limit 20 --sort word-count $@''; nt = ''zk new --title "''${*:2}" $1''; }; diff --git a/modules/home-manager/nvim/zk.nix b/modules/home-manager/nvim/zk.nix index 60c04dc..983c9b1 100644 --- a/modules/home-manager/nvim/zk.nix +++ b/modules/home-manager/nvim/zk.nix @@ -8,5 +8,31 @@ programs.nixvim = { plugins.zk.enable = true; }; + plugins.which-key.settings.spec = [ + { + __unkeyed-1 = "<leader>z"; + group = "+zk"; + } + ]; + keymaps = [ + { + action = ":ZkNewFromTitleSelection"; + key = "<leader>zn"; + mode = "n"; + options = { + silent = true; + desc = "New zk note with title from selection"; + }; + } + { + action = ":ZkaMatch"; + key = "<leader>zs"; + mode = "n"; + options = { + silent = true; + desc = "Search zk notes from selection"; + }; + } + ]; }; }