From 9ea049b6a04dec129ba8ed1ac66e0c929f67ed6e Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 6 Mar 2026 11:24:02 -0500 Subject: [PATCH] fix(buffer): use `default_category` config for empty placeholder Problem: The empty-buffer fallback hardcoded the category name `TODO`, ignoring the user's `default_category` config value (default: `Todo`). Solution: Read `config.get().default_category` at render time and use that value for both the header line and `LineMeta` category field. --- lua/pending/buffer.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/pending/buffer.lua b/lua/pending/buffer.lua index 8fdcbe1..827ff82 100644 --- a/lua/pending/buffer.lua +++ b/lua/pending/buffer.lua @@ -303,6 +303,12 @@ function M.render(bufnr) lines, line_meta = views.category_view(tasks) end + if #lines == 0 and #_filter_predicates == 0 then + local default_cat = config.get().default_category + lines = { '# ' .. default_cat } + line_meta = { { type = 'header', category = default_cat } } + end + if #_filter_predicates > 0 then table.insert(lines, 1, 'FILTER: ' .. table.concat(_filter_predicates, ' ')) table.insert(line_meta, 1, { type = 'filter' })