From 72f4b407c3aa472dce50c0acaf6063bb5ff2c1ff Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:11:06 +1000 Subject: [PATCH] Add zk no neovim --- alex/nvim/init.lua | 25 ++++++++++++++++++++++++- alex/personal.nix | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/alex/nvim/init.lua b/alex/nvim/init.lua index f01875c..12ae617 100644 --- a/alex/nvim/init.lua +++ b/alex/nvim/init.lua @@ -987,7 +987,30 @@ require("lazy").setup({ } end, dependencies = { {"nvim-tree/nvim-web-devicons"}} - } + }, + { + "zk-org/zk-nvim", + config = function() + require("zk").setup({ + picker = "telescope", + }) + + local opts = { noremap = true, silent = true } + + -- new note in the current group/dir + vim.keymap.set("n", "zn", "ZkNew { title = vim.fn.input('Title: ') }", opts) + -- new note in inbox (no title needed) + vim.keymap.set("n", "zi", "ZkNew { dir = 'inbox' }", opts) + -- search notes by title/filename + vim.keymap.set("n", "zf", "ZkNotes { sort = { 'modified' } }", opts) + -- search notes by content (full text) + vim.keymap.set("n", "zs", "ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }", opts) + -- search tags + vim.keymap.set("n", "zt", "ZkTags", opts) + -- insert a link to another note + vim.keymap.set("n", "zl", "ZkInsertLink", opts) + end, + }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/alex/personal.nix b/alex/personal.nix index 2ff953a..8d5f035 100644 --- a/alex/personal.nix +++ b/alex/personal.nix @@ -10,6 +10,7 @@ in home.packages = with pkgs; [ foliate inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default + zk # jrnl # disable tests for now until the bug is fixed # https://github.com/NixOS/nixpkgs/issues/476190