refactor(neorg): scope of some bindings

This commit is contained in:
Fabrice Mouhartem 2024-11-11 10:48:21 +01:00
parent 7b8db55790
commit f8acdeac19
Signed by: fmouhart
GPG Key ID: 2C5033B228CFE4E7

View File

@ -10,6 +10,29 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
vim.o.foldlevelstart = 99
vim.api.nvim_set_keymap("n", "<Leader>nr", ":Neorg return<CR>",
{ noremap = true, silent = true, desc = "[N]eorg [R]eturn" })
-- Neorg Telescope
vim.api.nvim_set_keymap("n", "<Leader>nh", "<Plug>(neorg.telescope.search_headings)",
{ noremap = true, silent = true, desc = "[N]eorg search [H]eading" })
vim.api.nvim_set_keymap("n", "<Leader>nb", "<Plug>(neorg.telescope.backlinks.file_backlinks)",
{ noremap = true, silent = true, desc = "[N]eorg file [B]acklinks" })
vim.api.nvim_set_keymap("n", "<C-l>", "<Plug>(neorg.telescope.insert_link)",
{ noremap = true, silent = true, desc = "Neorg insert [L]ink" })
-- Tasks
vim.api.nvim_set_keymap("n", "<LocalLeader>td", "<Plug>(neorg.qol.todo-items.todo.task-done)",
{ noremap = true, silent = true, desc = "[T]ask [D]one" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tu", "<Plug>(neorg.qol.todo-items.todo.task-undone)",
{ noremap = true, silent = true, desc = "[T]ask [U]ndone" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tp", "<Plug>(neorg.qol.todo-items.todo.task-pending)",
{ noremap = true, silent = true, desc = "[T]ask [P]ending" })
vim.api.nvim_set_keymap("n", "<LocalLeader>th", "<Plug>(neorg.qol.todo-items.todo.task-on_hold)",
{ noremap = true, silent = true, desc = "[T]ask on [H]old" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tc", "<Plug>(neorg.qol.todo-items.todo.task-cancelled)",
{ noremap = true, silent = true, desc = "[T]ask on [C]ancelled" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tr", "<Plug>(neorg.qol.todo-items.todo.task-recurring)",
{ noremap = true, silent = true, desc = "[T]ask on [R]ecurring" })
vim.api.nvim_set_keymap("n", "<LocalLeader>ti", "<Plug>(neorg.qol.todo-items.todo.task-important)",
{ noremap = true, silent = true, desc = "[T]ask on [I]mportant" })
end,
})
@ -44,29 +67,7 @@ vim.api.nvim_set_keymap("n", "<Leader>nee", ":Neorg export to-file /tmp/neorg-ex
{ noremap = true, silent = true, desc = "[N]eorg [E]xport Predefined" })
vim.api.nvim_set_keymap("n", "<Leader>nef", ":Neorg export to-file ",
{ noremap = true, silent = true, desc = "[N]eorg [E]xport [F]ile" })
vim.api.nvim_set_keymap("n", "<Leader>nh", "<Plug>(neorg.telescope.search_headings)",
{ noremap = true, silent = true, desc = "[N]eorg search [H]eading" })
vim.api.nvim_set_keymap("n", "<Leader>nl", "<Plug>(neorg.telescope.find_linkable)",
{ noremap = true, silent = true, desc = "[N]eorg find [L]inkable" })
vim.api.nvim_set_keymap("n", "<Leader>nf", "<Plug>(neorg.telescope.find_norg_files)",
{ noremap = true, silent = true, desc = "[N]eorg find [F]ile" })
vim.api.nvim_set_keymap("n", "<Leader>nb", "<Plug>(neorg.telescope.backlinks.file_backlinks)",
{ noremap = true, silent = true, desc = "[N]eorg file [B]acklinks" })
vim.api.nvim_set_keymap("n", "<C-l>", "<Plug>(neorg.telescope.insert_link)",
{ noremap = true, silent = true, desc = "Neorg insert [L]ink" })
-- Tasks
vim.api.nvim_set_keymap("n", "<LocalLeader>td", "<Plug>(neorg.qol.todo-items.todo.task-done)",
{ noremap = true, silent = true, desc = "[T]ask [D]one" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tu", "<Plug>(neorg.qol.todo-items.todo.task-undone)",
{ noremap = true, silent = true, desc = "[T]ask [U]ndone" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tp", "<Plug>(neorg.qol.todo-items.todo.task-pending)",
{ noremap = true, silent = true, desc = "[T]ask [P]ending" })
vim.api.nvim_set_keymap("n", "<LocalLeader>th", "<Plug>(neorg.qol.todo-items.todo.task-on_hold)",
{ noremap = true, silent = true, desc = "[T]ask on [H]old" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tc", "<Plug>(neorg.qol.todo-items.todo.task-cancelled)",
{ noremap = true, silent = true, desc = "[T]ask on [C]ancelled" })
vim.api.nvim_set_keymap("n", "<LocalLeader>tr", "<Plug>(neorg.qol.todo-items.todo.task-recurring)",
{ noremap = true, silent = true, desc = "[T]ask on [R]ecurring" })
vim.api.nvim_set_keymap("n", "<LocalLeader>ti", "<Plug>(neorg.qol.todo-items.todo.task-important)",
{ noremap = true, silent = true, desc = "[T]ask on [I]mportant" })