Compare commits
No commits in common. "fbceea242d9ffb058c664d2ab640e4b34167c1bc" and "22b70a06390950c31c3f86f48a8f727ed8253f9a" have entirely different histories.
fbceea242d
...
22b70a0639
3 changed files with 44 additions and 23 deletions
|
@ -1,10 +1,6 @@
|
|||
local map = vim.keymap.set
|
||||
require("which-key").register({ ["<localleader>c"] = { name = "+md-code" } })
|
||||
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
|
||||
require('which-key').register({ ["<localleader>c" ] = { name = "+md-code"}})
|
||||
require('which-key').register({ ["<localleader>e" ] = { name = "+criticmarkup"}})
|
||||
|
||||
-- edit code cells with full lsp access
|
||||
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" })
|
||||
|
||||
-- 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>MarkmapWatch<cr>", { desc = "watch for md mindmap" })
|
||||
end
|
||||
|
|
|
@ -87,5 +87,6 @@
|
|||
"which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
|
||||
"wrapping.nvim": { "branch": "master", "commit": "5e87f1424c86c50d3bc205830aa56ed1cad45467" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" },
|
||||
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" },
|
||||
"zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" }
|
||||
}
|
|
@ -65,11 +65,6 @@ local prose_plugs = {
|
|||
prefix({ ["<leader>n"] = { name = "+notes" } })
|
||||
prefix({ ["<localleader>n"] = { name = "+note" } })
|
||||
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
|
||||
require("zk").setup({ picker = "telescope" })
|
||||
end,
|
||||
|
@ -87,25 +82,54 @@ local prose_plugs = {
|
|||
"ZkNewFromTitleSelection",
|
||||
"ZkNotes",
|
||||
"ZkTags",
|
||||
"ZkOrphans",
|
||||
},
|
||||
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>nf",
|
||||
"<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
|
||||
desc = "note search",
|
||||
},
|
||||
{ "<leader>nf", "<cmd>ZkMatch<cr>", desc = "find note from selection", mode = "v" },
|
||||
{ "<leader>nt", "<cmd>ZkTags<cr>", desc = "note tags" },
|
||||
{ "<leader>nc", "<cmd>ZkCd<cr>", desc = "notedir cd" },
|
||||
{ "<leader>no", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", desc = "orphans list" },
|
||||
{ "<leader>nl", "<cmd>ZkLinks<cr>", desc = "note links" },
|
||||
{ "<leader>nb", "<cmd>ZkBacklinks<cr>", desc = "note backlinks" },
|
||||
{ "<leader>nc", "<cmd>ZkCd<cr>", desc = "notes directory" },
|
||||
{ "<localleader>nl", "<cmd>ZkLinks<cr>", desc = "note links" },
|
||||
{ "<localleader>nb", "<cmd>ZkLinks<cr>", desc = "note backlinks" },
|
||||
{ "<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", "<cmd>ZkNewFromContentSelection<cr>", desc = "content from selection", mode = "v" },
|
||||
{ "<localleader>nn", ":ZkNewFromTitleSelection<cr>", desc = "title 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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue