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:
parent
e764b34ecb
commit
36898898a7
5 changed files with 22 additions and 23 deletions
|
|
@ -842,7 +842,6 @@ Fields: ~
|
|||
{eol_format} (string, default: '%c %r %d')
|
||||
Format string for end-of-line virtual text.
|
||||
Specifiers:
|
||||
`%l` forge link label (`PendingForge`)
|
||||
`%c` category icon + name (`PendingHeader`)
|
||||
`%r` recurrence icon + pattern (`PendingRecur`)
|
||||
`%d` due icon + date (`PendingDue`/`PendingOverdue`)
|
||||
|
|
@ -1486,10 +1485,6 @@ inline with a formatted label using overlay extmarks (same technique as
|
|||
checkbox icons). Multiple forge references in one line are each overlaid
|
||||
independently.
|
||||
|
||||
The `%l` specifier in `eol_format` is still supported for users who prefer
|
||||
the link label in EOL virtual text, but it is no longer in the default
|
||||
format (`'%c %r %d'`).
|
||||
|
||||
Format string: ~
|
||||
*pending-forge-format*
|
||||
Each forge has a configurable `issue_format` string with these placeholders:
|
||||
|
|
@ -1505,6 +1500,7 @@ Configuration: ~
|
|||
>lua
|
||||
vim.g.pending = {
|
||||
forge = {
|
||||
auto_close = false,
|
||||
github = {
|
||||
token = nil,
|
||||
icon = '',
|
||||
|
|
@ -1527,6 +1523,11 @@ Configuration: ~
|
|||
}
|
||||
<
|
||||
|
||||
Top-level fields: ~
|
||||
{auto_close} (boolean, default: false) When true, tasks linked to
|
||||
closed/merged remote issues are automatically marked
|
||||
done on buffer open.
|
||||
|
||||
Fields (per forge): ~
|
||||
{token} (string, optional) API token for authenticated requests.
|
||||
Falls back to CLI: `gh auth token` (GitHub), `glab auth
|
||||
|
|
@ -1551,9 +1552,10 @@ than 5 minutes are re-fetched asynchronously. The buffer renders immediately
|
|||
with cached data and updates extmarks when the fetch completes.
|
||||
|
||||
State pull: ~
|
||||
After fetching, if the remote issue/PR is closed or merged and the local
|
||||
task is pending/wip/blocked, the task is automatically marked as done. This
|
||||
is one-way: local status changes do not push back to the forge.
|
||||
Requires `forge.auto_close = true`. After fetching, if the remote issue/PR
|
||||
is closed or merged and the local task is pending/wip/blocked, the task is
|
||||
automatically marked as done. Disabled by default. One-way: local status
|
||||
changes do not push back to the forge.
|
||||
|
||||
Highlight groups: ~
|
||||
|PendingForge| Open issue/PR link label
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue