feat: complete task editing coverage (#109)

Problem: the task editing surface had gaps — category and recurrence had
no keymaps, `:Pending edit` required knowing the task ID, tasks couldn't
be reordered with a keymap, priority was binary (0/1), and `wip`/`blocked`
states were documented but unimplemented.

Solution: fill every cell so every property is editable in every way.

- `gc`/`gr` keymaps for category select and recurrence prompt
- cursor-aware `:Pending edit` (omit ID to use task under cursor)
- `J`/`K` keymaps to reorder tasks within a category
- multi-level priorities (`max_priority` config, `g!` cycles 0→1→2→3→0)
- `+!!`/`+!!!` tokens in `:Pending edit`, `:Pending add`, `parse.body()`
- `PendingPriority2`/`PendingPriority3` highlight groups
- `gw`/`gb` keymaps toggle `wip`/`blocked` status
- `>`/`=` state chars in buffer rendering and diff parsing
- `PendingWip`/`PendingBlocked` highlight groups
- sort order: wip → pending → blocked → done
- `wip`/`blocked` filter predicates and icons
This commit is contained in:
Barrett Ruth 2026-03-08 19:44:03 -04:00 committed by GitHub
parent 073541424e
commit b06249f101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 498 additions and 101 deletions

View file

@ -13,6 +13,8 @@ local function edit_field_candidates()
'cat:',
rk .. ':',
'+!',
'+!!',
'+!!!',
'-!',
'-' .. dk,
'-cat',
@ -181,7 +183,7 @@ end, {
for word in after_filter:gmatch('%S+') do
used[word] = true
end
local candidates = { 'clear', 'overdue', 'today', 'priority', 'done', 'pending' }
local candidates = { 'clear', 'overdue', 'today', 'priority', 'done', 'pending', 'wip', 'blocked' }
local store = require('pending.store')
local s = store.new(store.resolve_path())
s:load()
@ -280,6 +282,30 @@ vim.keymap.set('n', '<Plug>(pending-undo)', function()
require('pending').undo_write()
end)
vim.keymap.set('n', '<Plug>(pending-category)', function()
require('pending').prompt_category()
end)
vim.keymap.set('n', '<Plug>(pending-recur)', function()
require('pending').prompt_recur()
end)
vim.keymap.set('n', '<Plug>(pending-move-down)', function()
require('pending').move_task('down')
end)
vim.keymap.set('n', '<Plug>(pending-move-up)', function()
require('pending').move_task('up')
end)
vim.keymap.set('n', '<Plug>(pending-wip)', function()
require('pending').toggle_status('wip')
end)
vim.keymap.set('n', '<Plug>(pending-blocked)', function()
require('pending').toggle_status('blocked')
end)
vim.keymap.set('n', '<Plug>(pending-filter)', function()
vim.ui.input({ prompt = 'Filter: ' }, function(input)
if input then