pending.nvim/spec
Barrett Ruth 1748e5caa1
feat(file-token): file: inline metadata token with gf navigation (#45)
* feat(file-token): add file: inline metadata token with gf navigation

Problem: there was no way to link a task to a specific location in a
source file, or to quickly jump from a task to the relevant code.

Solution: add a file:<path>:<line> inline token that stores a relative
file reference in task._extra.file. Virtual text renders basename:line
in a new PendingFile highlight group. A buffer-local gf mapping
(configurable via keymaps.goto_file) opens the file at the given line.
M.add_here() lets users attach the current cursor position to any task
via vim.ui.select(). M.edit() gains -file support to clear the
reference. <Plug>(pending-goto-file) and <Plug>(pending-add-here) are
exposed for custom mappings.

* test(file-token): add parse, diff, views, edit, and navigation tests

Problem: the file: token implementation had no test coverage.

Solution: add spec/file_spec.lua covering parse.body extraction,
malformed token handling, duplicate token stop-parsing, diff
reconciliation (store/update/clear/round-trip), LineMeta population
in both views, :Pending edit -file, and goto_file notify paths for
no-file and unreadable-file cases. All 292 tests pass.

* style: apply stylua formatting

* fix(types): remove empty elseif block, fix file? annotation nullability
2026-02-26 19:12:48 -05:00
..
archive_spec.lua test: add missing coverage (#19) 2026-02-24 22:33:13 -05:00
complete_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00
diff_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00
edit_spec.lua feat: :Pending edit command for CLI metadata editing (#41) 2026-02-26 16:34:07 -05:00
file_spec.lua feat(file-token): file: inline metadata token with gf navigation (#45) 2026-02-26 19:12:48 -05:00
filter_spec.lua feat(filter): oil-like editable filter line (#43) 2026-02-26 18:29:56 -05:00
helpers.lua test: add store, parse, and diff specs 2026-02-24 15:10:09 -05:00
parse_spec.lua feat: time-aware due dates, persistent undo, @return audit (#33) 2026-02-25 20:37:50 -05:00
recur_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00
status_spec.lua feat: statusline API, counts, and PendingStatusChanged event (#40) 2026-02-26 16:30:06 -05:00
store_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00
sync_spec.lua feat(sync): backend interface + CLI refactor (#42) 2026-02-26 17:59:04 -05:00
textobj_spec.lua feat: text objects and motions for the pending buffer (#39) 2026-02-26 16:28:58 -05:00
views_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00