feat(init): multi-level priority with <C-a>/<C-x>

Problem: priority was binary (0 or 1), toggled with !, with no way
to express finer gradations or use Vim's native increment idiom.

Solution: replace toggle_priority with change_priority(delta) which
clamps to floor 0. Display format changes from '! ' to '[N] ' so any
integer level is representable. Parser updated to extract numeric
level from the [N] prefix. Visual g<C-a>/g<C-x> apply the delta to
all tasks in the selection. <Plug>(pending-priority) replaced with
<Plug>(pending-priority-up) and <Plug>(pending-priority-down).
This commit is contained in:
Barrett Ruth 2026-02-24 22:01:21 -05:00 committed by Barrett Ruth
parent 39c98012d0
commit fe15721c6f
5 changed files with 60 additions and 13 deletions

View file

@ -57,7 +57,7 @@ local function setup_syntax(bufnr)
syntax clear
syntax match taskId /^\/\d\+\// conceal
syntax match taskHeader /^\S.*$/ contains=taskId
syntax match taskPriority /! / contained containedin=taskLine
syntax match taskPriority /\[\d\+\] / contained containedin=taskLine
syntax match taskLine /^\/\d\+\/ .*$/ contains=taskId,taskPriority
]])
end)