summaryrefslogtreecommitdiff
path: root/lua/config/plugins
diff options
context:
space:
mode:
authorMarcelo <setanta@gmail.com>2025-04-03 23:49:35 -0300
committerMarcelo <setanta@gmail.com>2025-04-04 00:10:31 -0300
commitd4677b4cb0f367c871eed674c50eb9555cc8adeb (patch)
treea4e5682d91a45d7535c5975c66b5bc89e4cb3fd7 /lua/config/plugins
parent622b5cc8da61ace34dee4a453326dbd33e7b58b8 (diff)
Improve Zettelkasten notes keybind situation.
Diffstat (limited to 'lua/config/plugins')
-rw-r--r--lua/config/plugins/notes.lua25
1 files changed, 12 insertions, 13 deletions
diff --git a/lua/config/plugins/notes.lua b/lua/config/plugins/notes.lua
index 57d5d24..a76271e 100644
--- a/lua/config/plugins/notes.lua
+++ b/lua/config/plugins/notes.lua
@@ -16,21 +16,19 @@ return {
},
})
- local opts = { noremap = true, silent = false }
+ vim.keymap.set("n", "<Leader>zn", "<CMD>ZkNew { title = vim.fn.input('Title: ') }<CR>",
+ { noremap = true, silent = false, desc = "Create a new note after asking for its title." })
- -- Create a new note after asking for its title.
- vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
+ vim.keymap.set("n", "<Leader>zo", "<CMD>ZkNotes { sort = { 'modified' } }<CR>",
+ { noremap = true, silent = false, desc = "Open notes." })
+ vim.keymap.set("n", "<Leader>zt", "<CMD>ZkTags<CR>",
+ { noremap = true, silent = false, desc = "Open notes associated with the selected tags." })
- -- Open notes.
- vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
- -- Open notes associated with the selected tags.
- vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
-
- -- Search for the notes matching a given query.
- vim.api.nvim_set_keymap("n", "<leader>zf",
- "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
- -- Search for the notes matching the current visual selection.
- vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
+ vim.keymap.set("n", "<Leader>zf",
+ "<CMD>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
+ { noremap = true, silent = false, desc = "Search for the notes matching a given query." })
+ vim.keymap.set("v", "<Leader>zf", ":'<,'>ZkMatch<CR>",
+ { noremap = true, silent = false, desc = "Search for the notes matching the current visual selection." })
end
},
@@ -46,6 +44,7 @@ return {
position = "right",
width = "block",
border = "thick",
+ language_pad = 1,
min_width = min_width,
left_pad = 1,
right_pad = 1,