From 0b0b64fc3d3f02d8e9ca1d72b83999f3f64f8b88 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 12 Mar 2026 21:01:11 -0400 Subject: [PATCH] ci: format --- lua/pending/init.lua | 10 ++++++++-- lua/pending/views.lua | 12 ++++++------ plugin/pending.lua | 13 +++++++++++-- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/lua/pending/init.lua b/lua/pending/init.lua index 39c0bae..38fdf50 100644 --- a/lua/pending/init.lua +++ b/lua/pending/init.lua @@ -1192,7 +1192,10 @@ function M.archive(arg) log.debug(('archive: days=%d cutoff=%s total_tasks=%d'):format(days, cutoff, #tasks)) local count = 0 for _, task in ipairs(tasks) do - if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then + if + (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') + and task['end'] + then if task['end'] < cutoff then count = count + 1 end @@ -1213,7 +1216,10 @@ function M.archive(arg) function() local kept = {} for _, task in ipairs(tasks) do - if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then + if + (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') + and task['end'] + then if task['end'] < cutoff then goto skip end diff --git a/lua/pending/views.lua b/lua/pending/views.lua index 4321e64..7afeeb7 100644 --- a/lua/pending/views.lua +++ b/lua/pending/views.lua @@ -275,9 +275,9 @@ function M.category_view(tasks) category = cat, priority = task.priority, overdue = task.status ~= 'done' - and task.status ~= 'cancelled' - and task.due ~= nil - and parse.is_overdue(task.due) + and task.status ~= 'cancelled' + and task.due ~= nil + and parse.is_overdue(task.due) or nil, recur = task.recur, forge_spans = compute_forge_spans(task, prefix_len), @@ -332,9 +332,9 @@ function M.priority_view(tasks) category = task.category, priority = task.priority, overdue = task.status ~= 'done' - and task.status ~= 'cancelled' - and task.due ~= nil - and parse.is_overdue(task.due) + and task.status ~= 'cancelled' + and task.due ~= nil + and parse.is_overdue(task.due) or nil, show_category = true, recur = task.recur, diff --git a/plugin/pending.lua b/plugin/pending.lua index d9420c6..8e2f633 100644 --- a/plugin/pending.lua +++ b/plugin/pending.lua @@ -245,8 +245,17 @@ end, { for word in after_filter:gmatch('%S+') do used[word] = true end - local candidates = - { 'clear', 'overdue', 'today', 'priority', 'done', 'pending', 'wip', 'blocked', 'cancelled' } + local candidates = { + 'clear', + 'overdue', + 'today', + 'priority', + 'done', + 'pending', + 'wip', + 'blocked', + 'cancelled', + } local store = require('pending.store') local s = store.new(store.resolve_path()) s:load()