Skip to content

Commit

Permalink
zk: add mappings to control and search for notes
Browse files Browse the repository at this point in the history
Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Nov 18, 2024
1 parent 10adbee commit ff700e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ local function avante_templates()
})
end

local function zettelkasten()
keymaps.register({ "n" }, {
["<leader>zn"] = "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>",
["<leader>zo"] = "<Cmd>ZkNotes { sort = { 'modified' } }<CR>",
["<leader>zt"] = "<Cmd>ZkTags<CR>",
["<leader>zf"] = "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
})
end

local function buffer()
keymaps.register("n", {
["+"] = [[<C-a>]],
Expand Down Expand Up @@ -222,6 +231,7 @@ mappings.setup = function()
navigations()
tabs()
windows()
zettelkasten()
end

return mappings

0 comments on commit ff700e5

Please sign in to comment.