--vim.api.nvim_set_keymap('', 'à', '', { noremap = true, silent = true }) local neorgroup = vim.api.nvim_create_augroup("neorg", { clear = true }) vim.api.nvim_create_autocmd({ "FileType" }, { pattern = { "norg" }, group = neorgroup, callback = function() vim.g.maplocalleader = ' ' vim.o.conceallevel = 2 vim.o.foldlevelstart = 99 vim.api.nvim_set_keymap("n", "nr", ":Neorg return", { noremap = true, silent = true, desc = "[N]eorg [R]eturn" }) -- Neorg Telescope vim.api.nvim_set_keymap("n", "nh", "(neorg.telescope.search_headings)", { noremap = true, silent = true, desc = "[N]eorg search [H]eading" }) vim.api.nvim_set_keymap("n", "nb", "(neorg.telescope.backlinks.file_backlinks)", { noremap = true, silent = true, desc = "[N]eorg file [B]acklinks" }) vim.api.nvim_set_keymap("n", "", "(neorg.telescope.insert_link)", { noremap = true, silent = true, desc = "Neorg insert [L]ink" }) -- Tasks vim.api.nvim_set_keymap("n", "td", "(neorg.qol.todo-items.todo.task-done)", { noremap = true, silent = true, desc = "[T]ask [D]one" }) vim.api.nvim_set_keymap("n", "tu", "(neorg.qol.todo-items.todo.task-undone)", { noremap = true, silent = true, desc = "[T]ask [U]ndone" }) vim.api.nvim_set_keymap("n", "tp", "(neorg.qol.todo-items.todo.task-pending)", { noremap = true, silent = true, desc = "[T]ask [P]ending" }) vim.api.nvim_set_keymap("n", "th", "(neorg.qol.todo-items.todo.task-on_hold)", { noremap = true, silent = true, desc = "[T]ask on [H]old" }) vim.api.nvim_set_keymap("n", "tc", "(neorg.qol.todo-items.todo.task-cancelled)", { noremap = true, silent = true, desc = "[T]ask on [C]ancelled" }) vim.api.nvim_set_keymap("n", "tr", "(neorg.qol.todo-items.todo.task-recurring)", { noremap = true, silent = true, desc = "[T]ask on [R]ecurring" }) vim.api.nvim_set_keymap("n", "ti", "(neorg.qol.todo-items.todo.task-important)", { noremap = true, silent = true, desc = "[T]ask on [I]mportant" }) end, }) -- document existing key chains require('which-key').add { { "l", group = "neorg [L]ist" }, { "l_", hidden = true }, { "t", group = "neorg [T]asks" }, { "n", group = "[N]eorg" }, { "n_", hidden = true }, { "ne", group = "[N]eorg [E]xport" }, { "ne_", hidden = true }, } vim.api.nvim_set_keymap("n", "ni", ":Neorg index", { noremap = true, silent = true, desc = "[N]eorg [I]ndex" }) vim.api.nvim_set_keymap("n", "nm", ":Neorg inject-metadata", { noremap = true, silent = true, desc = "[N]eorg insert [M]etadata" }) vim.api.nvim_set_keymap("n", "nj", ":Neorg journal toc open", { noremap = true, silent = true, desc = "[N]eorg [J]ournal" }) vim.api.nvim_set_keymap("n", "nt", ":Neorg journal today", { noremap = true, silent = true, desc = "[N]eorg [T]oday" }) vim.api.nvim_set_keymap("n", "ns", ":Neorg journal tomorrow", { noremap = true, silent = true, desc = "Neorg tomorrow" }) vim.api.nvim_set_keymap("n", "ny", ":Neorg journal yesterday", { noremap = true, silent = true, desc = "[N]eorg [Y]esterday" }) vim.api.nvim_set_keymap("n", "neo", ":e /tmp/neorg-export.md", { noremap = true, silent = true, desc = "[N]eorg [E]xport [O]pen" }) vim.api.nvim_set_keymap("n", "nee", ":Neorg export to-file /tmp/neorg-export.md", { noremap = true, silent = true, desc = "[N]eorg [E]xport Predefined" }) vim.api.nvim_set_keymap("n", "nef", ":Neorg export to-file ", { noremap = true, silent = true, desc = "[N]eorg [E]xport [F]ile" }) vim.api.nvim_set_keymap("n", "nl", "(neorg.telescope.find_linkable)", { noremap = true, silent = true, desc = "[N]eorg find [L]inkable" }) vim.api.nvim_set_keymap("n", "nf", "(neorg.telescope.find_norg_files)", { noremap = true, silent = true, desc = "[N]eorg find [F]ile" })