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.
This commit is contained in:
Barrett Ruth 2026-02-26 18:20:32 -05:00
parent 3da23c924a
commit 7835dc4687
9 changed files with 257 additions and 9 deletions

View file

@ -22,6 +22,7 @@
---@field prev_header? string|false
---@field next_task? string|false
---@field prev_task? string|false
---@field goto_file? string|false
---@class pending.Config
---@field data_path string