feat: add cancelled task status with configurable state chars (#158)
Problem: the task lifecycle only has `pending`, `wip`, `blocked`, and `done`. There is no way to mark a task as abandoned. Additionally, state characters (`>`, `=`) are hardcoded rather than reading from `config.icons`, so customizing them has no effect on rendering or parsing. Solution: add a `cancelled` status with default state char `c`, `g/` keymap, `PendingCancelled` highlight, filter predicate, and archive support. Unify state chars by making `state_char()`, `parse_buffer()`, and `infer_status()` read from `config.icons`. Change defaults to mnemonic chars: `w` (wip), `b` (blocked), `c` (cancelled).
This commit is contained in:
parent
4a37cb64e4
commit
7c3ba31c43
9 changed files with 109 additions and 45 deletions
|
|
@ -11,6 +11,7 @@
|
|||
---@field priority string
|
||||
---@field wip string
|
||||
---@field blocked string
|
||||
---@field cancelled string
|
||||
---@field due string
|
||||
---@field recur string
|
||||
---@field category string
|
||||
|
|
@ -80,6 +81,7 @@
|
|||
---@field blocked? string|false
|
||||
---@field priority_up_visual? string|false
|
||||
---@field priority_down_visual? string|false
|
||||
---@field cancelled? string|false
|
||||
|
||||
---@class pending.CategoryViewConfig
|
||||
---@field order? string[]
|
||||
|
|
@ -160,6 +162,7 @@ local defaults = {
|
|||
move_up = 'K',
|
||||
wip = 'gw',
|
||||
blocked = 'gb',
|
||||
cancelled = 'g/',
|
||||
priority_up = '<C-a>',
|
||||
priority_down = '<C-x>',
|
||||
priority_up_visual = 'g<C-a>',
|
||||
|
|
@ -190,8 +193,9 @@ local defaults = {
|
|||
pending = ' ',
|
||||
done = 'x',
|
||||
priority = '!',
|
||||
wip = '>',
|
||||
blocked = '=',
|
||||
wip = 'w',
|
||||
blocked = 'b',
|
||||
cancelled = 'c',
|
||||
due = '.',
|
||||
recur = '~',
|
||||
category = '#',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue