refactor(forge): remove %l eol specifier, add auto_close config, fix icons

Problem: `%l` was dead code after inline overlays replaced EOL
rendering. Auto-close was always on with no opt-out. Forge icon
defaults were empty strings.

Solution: remove `%l` from the eol format parser and renderer. Add
`forge.auto_close` (default `false`) to gate state-pull. Set nerd
font icons: `` (GitHub), `` (GitLab), `` (Codeberg). Keep
conceal active in insert mode via `concealcursor = 'nic'`.
This commit is contained in:
Barrett Ruth 2026-03-10 19:54:42 -04:00
parent e764b34ecb
commit 36898898a7
5 changed files with 22 additions and 23 deletions

View file

@ -379,7 +379,7 @@ end
---@param winid integer
local function set_win_options(winid)
vim.wo[winid].conceallevel = 3
vim.wo[winid].concealcursor = 'nc'
vim.wo[winid].concealcursor = 'nic'
vim.wo[winid].winfixheight = true
end
@ -446,7 +446,7 @@ end
---@class pending.EolSegment
---@field type 'specifier'|'literal'
---@field key? 'c'|'r'|'d'|'l'
---@field key? 'c'|'r'|'d'
---@field text? string
---@param fmt string
@ -458,7 +458,7 @@ local function parse_eol_format(fmt)
while pos <= len do
if fmt:sub(pos, pos) == '%' and pos + 1 <= len then
local key = fmt:sub(pos + 1, pos + 1)
if key == 'c' or key == 'r' or key == 'd' or key == 'l' then
if key == 'c' or key == 'r' or key == 'd' then
table.insert(segments, { type = 'specifier', key = key })
pos = pos + 2
else
@ -485,10 +485,7 @@ local function build_eol_virt(segments, m, icons)
for i, seg in ipairs(segments) do
if seg.type == 'specifier' then
local text, hl
if seg.key == 'l' and m.forge_ref then
local forge = require('pending.forge')
text, hl = forge.format_label(m.forge_ref, m.forge_cache)
elseif seg.key == 'c' and m.show_category and m.category then
if seg.key == 'c' and m.show_category and m.category then
text = icons.category .. ' ' .. m.category
hl = 'PendingHeader'
elseif seg.key == 'r' and m.recur then