From 3f420834b6f445289aa9d839b68c258d056407a2 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Wed, 26 Feb 2025 16:15:21 +0100 Subject: [PATCH 1/2] some keybindings for zk-nvim. --- configs/home-manager/zk.nix | 2 +- modules/home-manager/nvim/zk.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) 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 = "z"; + group = "+zk"; + } + ]; + keymaps = [ + { + action = ":ZkNewFromTitleSelection"; + key = "zn"; + mode = "n"; + options = { + silent = true; + desc = "New zk note with title from selection"; + }; + } + { + action = ":ZkaMatch"; + key = "zs"; + mode = "n"; + options = { + silent = true; + desc = "Search zk notes from selection"; + }; + } + ]; }; } From c86b3bac98b174f5b0cced5b7985a173f9640eba Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Wed, 26 Feb 2025 16:46:35 +0100 Subject: [PATCH 2/2] added some keybinds for zk-nvim. --- modules/home-manager/nvim/zk.nix | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/home-manager/nvim/zk.nix b/modules/home-manager/nvim/zk.nix index 983c9b1..99b984f 100644 --- a/modules/home-manager/nvim/zk.nix +++ b/modules/home-manager/nvim/zk.nix @@ -7,32 +7,32 @@ config = lib.mkIf config.user.nvim.enable { programs.nixvim = { plugins.zk.enable = true; + plugins.which-key.settings.spec = [ + { + __unkeyed-1 = "z"; + group = "+zk"; + } + ]; + keymaps = [ + { + action = ":ZkNewFromTitleSelection"; + key = "zn"; + mode = "n"; + options = { + silent = true; + desc = "New zk note with title from selection"; + }; + } + { + action = ":ZkaMatch"; + key = "zs"; + mode = "n"; + options = { + silent = true; + desc = "Search zk notes from selection"; + }; + } + ]; }; - plugins.which-key.settings.spec = [ - { - __unkeyed-1 = "z"; - group = "+zk"; - } - ]; - keymaps = [ - { - action = ":ZkNewFromTitleSelection"; - key = "zn"; - mode = "n"; - options = { - silent = true; - desc = "New zk note with title from selection"; - }; - } - { - action = ":ZkaMatch"; - key = "zs"; - mode = "n"; - options = { - silent = true; - desc = "Search zk notes from selection"; - }; - } - ]; }; }