feat(buffer): add configurable eol_format for EOL virtual text

Problem: EOL virtual text order (category → recurrence → due) and the
double-space separator are hardcoded in `apply_extmarks()`. Users cannot
reorder, omit, or restyle metadata fields.

Solution: Add `eol_format` config field (default `'%c  %r  %d'`) with
`%c`, `%r`, `%d` specifiers. `parse_eol_format()` tokenizes the format
string; `build_eol_virt()` resolves specifiers against `LineMeta` and
collapses literals around absent fields.
This commit is contained in:
Barrett Ruth 2026-03-08 14:25:22 -04:00
parent 27f46ae0dd
commit b6c28eb7b3
3 changed files with 116 additions and 15 deletions

View file

@ -64,6 +64,7 @@
---@field keymaps pending.Keymaps
---@field folding? boolean|pending.FoldingConfig
---@field sync? pending.SyncConfig
---@field eol_format? string
---@field icons pending.Icons
---@class pending.config
@ -78,6 +79,7 @@ local defaults = {
date_syntax = 'due',
recur_syntax = 'rec',
someday_date = '9999-12-30',
eol_format = '%c %r %d',
folding = true,
category_order = {},
keymaps = {