Compare commits

..

No commits in common. "fbceea242d9ffb058c664d2ab640e4b34167c1bc" and "22b70a06390950c31c3f86f48a8f727ed8253f9a" have entirely different histories.

3 changed files with 44 additions and 23 deletions

View file

@ -1,10 +1,6 @@
local map = vim.keymap.set local map = vim.keymap.set
require("which-key").register({ ["<localleader>c"] = { name = "+md-code" } }) require('which-key').register({ ["<localleader>c" ] = { name = "+md-code"}})
require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } }) require('which-key').register({ ["<localleader>e" ] = { name = "+criticmarkup"}})
if require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then
map("n", "<CR>", "<cmd>lua vim.lsp.buf.definition()<cr>", { silent = true })
end
-- edit code cells with full lsp access -- edit code cells with full lsp access
map("n", "<localleader>ce", "<cmd>FeMaco<cr>", { silent = true, desc = "edit code block" }) map("n", "<localleader>ce", "<cmd>FeMaco<cr>", { silent = true, desc = "edit code block" })
@ -23,7 +19,7 @@ map("n", "<localleader>cO", "O```python<cr><cr>```<esc>k", { desc = "Insert quar
map("n", "<localleader>cp", "<Plug>MarkdownPreviewToggle", { desc = "show md preview" }) map("n", "<localleader>cp", "<Plug>MarkdownPreviewToggle", { desc = "show md preview" })
-- create mindmaps directly from markdown! requires external executable -- create mindmaps directly from markdown! requires external executable
if vim.fn.executable("markmap") then if (vim.fn.executable("markmap")) then
map("n", "<localleader>cm", "<cmd>MarkmapOpen<cr>", { desc = "open md mindmap" }) map("n", "<localleader>cm", "<cmd>MarkmapOpen<cr>", { desc = "open md mindmap" })
map("n", "<localleader>cM", "<cmd>MarkmapWatch<cr>", { desc = "watch for md mindmap" }) map("n", "<localleader>cM", "<cmd>MarkmapWatch<cr>", { desc = "watch for md mindmap" })
end end

View file

@ -87,5 +87,6 @@
"which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
"wrapping.nvim": { "branch": "master", "commit": "5e87f1424c86c50d3bc205830aa56ed1cad45467" }, "wrapping.nvim": { "branch": "master", "commit": "5e87f1424c86c50d3bc205830aa56ed1cad45467" },
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }, "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" },
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" },
"zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" } "zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" }
} }

View file

@ -65,11 +65,6 @@ local prose_plugs = {
prefix({ ["<leader>n"] = { name = "+notes" } }) prefix({ ["<leader>n"] = { name = "+notes" } })
prefix({ ["<localleader>n"] = { name = "+note" } }) prefix({ ["<localleader>n"] = { name = "+note" } })
prefix({ ["<localleader>n"] = { name = "+note", mode = "v" } }) prefix({ ["<localleader>n"] = { name = "+note", mode = "v" } })
require("zk.commands").add("ZkOrphans", function(opts)
opts = vim.tbl_extend("force", { orphan = true }, opts or {})
require("zk").edit(opts, { title = "Zk Orphans" })
end)
end end
require("zk").setup({ picker = "telescope" }) require("zk").setup({ picker = "telescope" })
end, end,
@ -87,25 +82,54 @@ local prose_plugs = {
"ZkNewFromTitleSelection", "ZkNewFromTitleSelection",
"ZkNotes", "ZkNotes",
"ZkTags", "ZkTags",
"ZkOrphans",
}, },
keys = { keys = {
{ "<leader>ni", "<cmd>edit ~/documents/notes/index.md<cr>", desc = "open index", silent = true },
{ "<leader>nn", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", desc = "note list" }, { "<leader>nn", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", desc = "note list" },
{ {
"<leader>nf", "<leader>nf",
"<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
desc = "note search", desc = "note search",
}, },
{ "<leader>nf", "<cmd>ZkMatch<cr>", desc = "find note from selection", mode = "v" },
{ "<leader>nt", "<cmd>ZkTags<cr>", desc = "note tags" }, { "<leader>nt", "<cmd>ZkTags<cr>", desc = "note tags" },
{ "<leader>nc", "<cmd>ZkCd<cr>", desc = "notedir cd" }, { "<leader>nc", "<cmd>ZkCd<cr>", desc = "notes directory" },
{ "<leader>no", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", desc = "orphans list" }, { "<localleader>nl", "<cmd>ZkLinks<cr>", desc = "note links" },
{ "<leader>nl", "<cmd>ZkLinks<cr>", desc = "note links" }, { "<localleader>nb", "<cmd>ZkLinks<cr>", desc = "note backlinks" },
{ "<leader>nb", "<cmd>ZkBacklinks<cr>", desc = "note backlinks" },
{ "<localleader>nn", "<cmd>ZkNew { title = vim.fn.input('Title: ') }<cr>", desc = "new note" }, { "<localleader>nn", "<cmd>ZkNew { title = vim.fn.input('Title: ') }<cr>", desc = "new note" },
{ "<localleader>nn", "<cmd>ZkNewFromTitleSelection<cr>", desc = "new note from selection", mode = "v" }, { "<localleader>nn", ":ZkNewFromTitleSelection<cr>", desc = "title from selection", mode = "v" },
{ "<localleader>nN", "<cmd>ZkNewFromContentSelection<cr>", desc = "content from selection", mode = "v" }, { "<localleader>nN", ":ZkNewFromContentSelection<cr>", desc = "content from selection", mode = "v" },
{ "<localleader>nf", ":ZkMatch<cr>", desc = "find note from selection", mode = "v" },
},
},
-- simple static markdown linking and link following using zettel IDs
{
"marty-oehme/zettelkasten.nvim",
dependencies = {
"mickael-menu/zk-nvim", -- for the CD when opening index
},
ft = writing_ft,
keys = {
{
"<cr>",
function()
require("zettelkasten").link_follow()
end,
silent = true,
},
{
"<cr>",
function()
require("zettelkasten").link_follow(true)
end,
mode = "v",
},
{
"<leader>ni",
function()
require("zk.commands").get("ZkCd")()
require("zettelkasten").index_open()
end,
desc = "index page",
},
}, },
}, },