Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(keybinds.lua): add desc fields to task keybinds #926

Merged
merged 4 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions lua/neorg/modules/core/keybinds/keybinds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,47 @@ module.config.public = {
n = {
-- Marks the task under the cursor as "undone"
-- ^mark Task as Undone
{ leader .. "tu", "core.qol.todo_items.todo.task_undone" },
{ leader .. "tu", "core.qol.todo_items.todo.task_undone", opts = { desc = "Mark as Undone" } },

-- Marks the task under the cursor as "pending"
-- ^mark Task as Pending
{ leader .. "tp", "core.qol.todo_items.todo.task_pending" },
{ leader .. "tp", "core.qol.todo_items.todo.task_pending", opts = { desc = "Mark as Pending" } },

-- Marks the task under the cursor as "done"
-- ^mark Task as Done
{ leader .. "td", "core.qol.todo_items.todo.task_done" },
{ leader .. "td", "core.qol.todo_items.todo.task_done", opts = { desc = "Mark as Done" } },

-- Marks the task under the cursor as "on_hold"
-- ^mark Task as on Hold
{ leader .. "th", "core.qol.todo_items.todo.task_on_hold" },
{ leader .. "th", "core.qol.todo_items.todo.task_on_hold", opts = { desc = "Mark as On Hold" } },

-- Marks the task under the cursor as "cancelled"
-- ^mark Task as Cancelled
{ leader .. "tc", "core.qol.todo_items.todo.task_cancelled" },
{
leader .. "tc",
"core.qol.todo_items.todo.task_cancelled",
opts = { desc = "Mark as Cancelled" },
},

-- Marks the task under the cursor as "recurring"
-- ^mark Task as Recurring
{ leader .. "tr", "core.qol.todo_items.todo.task_recurring" },
{
leader .. "tr",
"core.qol.todo_items.todo.task_recurring",
opts = { desc = "Mark as Recurring" },
},

-- Marks the task under the cursor as "important"
-- ^mark Task as Important
{ leader .. "ti", "core.qol.todo_items.todo.task_important" },
{
leader .. "ti",
"core.qol.todo_items.todo.task_important",
opts = { desc = "Mark as Important" },
},

-- Marks the task under the cursor as "ambiguous"
-- ^mark Task as ambiguous
{ leader .. "ta", "core.qol.todo_items.todo.task_ambiguous" },
{ leader .. "ta", "core.qol.todo_items.todo.task_ambiguous", opts = { desc = "Mark as Ambigous" } },

-- Switches the task under the cursor between a select few states
{ "<C-Space>", "core.qol.todo_items.todo.task_cycle" },
Expand Down
2 changes: 1 addition & 1 deletion lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ module.public = {
.. " "
.. table.concat(vim.list_slice(keymap, 2), " ")
.. "<CR>",
opts
vim.tbl_deep_extend("force", opts, keymap.opts or {})
)
end
end
Expand Down