Add zk no neovim

This commit is contained in:
Alexander Wainwright 2026-04-09 20:11:06 +10:00
parent 77ec529eee
commit 72f4b407c3
2 changed files with 25 additions and 1 deletions

View file

@ -987,7 +987,30 @@ require("lazy").setup({
} }
end, end,
dependencies = { {"nvim-tree/nvim-web-devicons"}} 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", "<leader>zn", "<cmd>ZkNew { title = vim.fn.input('Title: ') }<cr>", opts)
-- new note in inbox (no title needed)
vim.keymap.set("n", "<leader>zi", "<cmd>ZkNew { dir = 'inbox' }<cr>", opts)
-- search notes by title/filename
vim.keymap.set("n", "<leader>zf", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", opts)
-- search notes by content (full text)
vim.keymap.set("n", "<leader>zs", "<cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<cr>", opts)
-- search tags
vim.keymap.set("n", "<leader>zt", "<cmd>ZkTags<cr>", opts)
-- insert a link to another note
vim.keymap.set("n", "<leader>zl", "<cmd>ZkInsertLink<cr>", opts)
end,
},
}, { }, {
ui = { ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the -- If you are using a Nerd Font: set icons to an empty table which will use the

View file

@ -10,6 +10,7 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
foliate foliate
inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default
zk
# jrnl # jrnl
# disable tests for now until the bug is fixed # disable tests for now until the bug is fixed
# https://github.com/NixOS/nixpkgs/issues/476190 # https://github.com/NixOS/nixpkgs/issues/476190