From 46b87e8f302d1e59e1f85b5f80749f0ba4a8be9c Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 10 Mar 2026 17:44:04 -0400 Subject: [PATCH] feat(config): add forge config defaults and `%l` eol specifier Problem: no configuration surface for forge link rendering, icons, issue format, or self-hosted instances. Solution: add `pending.ForgeConfig` class with per-forge `token`, `icon`, `issue_format`, and `instances` fields. Add `%l` to the default `eol_format` so forge labels render in virtual text. --- lua/pending/config.lua | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lua/pending/config.lua b/lua/pending/config.lua index 1d4c00a..232e841 100644 --- a/lua/pending/config.lua +++ b/lua/pending/config.lua @@ -33,6 +33,17 @@ ---@field profile? string ---@field region? string +---@class pending.ForgeInstanceConfig +---@field token? string +---@field icon? string +---@field issue_format? string +---@field instances? string[] + +---@class pending.ForgeConfig +---@field github? pending.ForgeInstanceConfig +---@field gitlab? pending.ForgeInstanceConfig +---@field codeberg? pending.ForgeInstanceConfig + ---@class pending.SyncConfig ---@field remote_delete? boolean ---@field gcal? pending.GcalConfig @@ -90,6 +101,7 @@ ---@field view pending.ViewConfig ---@field max_priority? integer ---@field sync? pending.SyncConfig +---@field forge? pending.ForgeConfig ---@field icons pending.Icons ---@class pending.config @@ -106,7 +118,7 @@ local defaults = { max_priority = 3, view = { default = 'category', - eol_format = '%c %r %d', + eol_format = '%l %c %r %d', category = { order = {}, folding = true, @@ -141,6 +153,23 @@ local defaults = { priority_down = '', }, sync = {}, + forge = { + github = { + icon = '', + issue_format = '%i %o/%r#%n', + instances = {}, + }, + gitlab = { + icon = '', + issue_format = '%i %o/%r#%n', + instances = {}, + }, + codeberg = { + icon = '', + issue_format = '%i %o/%r#%n', + instances = {}, + }, + }, icons = { pending = ' ', done = 'x',