feat(views): add hide_done_categories config option

Problem: Categories where every task is done still render in the buffer,
cluttering the view when entire categories are finished.

Solution: Add `view.category.hide_done_categories` (boolean, default
false). When enabled, `category_view()` skips categories whose tasks are
all done/deleted, returns their IDs as `done_cat_hidden_ids`, and
`_on_write` merges those IDs into `hidden_ids` passed to `diff.apply()`
so hidden tasks are not mistakenly deleted on `:w`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Barrett Ruth 2026-03-12 20:11:42 -04:00
parent 077e4121b4
commit 8d7759b6c4
6 changed files with 123 additions and 4 deletions

View file

@ -82,6 +82,7 @@
---@class pending.CategoryViewConfig
---@field order? string[]
---@field folding? boolean|pending.FoldingConfig
---@field hide_done_categories? boolean
---@class pending.QueueViewConfig
@ -128,6 +129,7 @@ local defaults = {
category = {
order = {},
folding = true,
hide_done_categories = false,
},
queue = {},
},