feat: time-aware due dates, persistent undo, @return audit (#33)
* fix(plugin): allow command chaining with bar separator
Problem: :Pending|only failed because the command definition lacked the
bar attribute, causing | to be consumed as an argument.
Solution: Add bar = true to nvim_create_user_command so | is treated as
a command separator, matching fugitive's :Git behavior.
* refactor(buffer): remove opinionated window options
Problem: The plugin hardcoded number, relativenumber, wrap, spell,
signcolumn, foldcolumn, and cursorline in set_win_options, overriding
user preferences with no way to opt out.
Solution: Remove all cosmetic window options. Users who want them can
set them in after/ftplugin/pending.lua. Only conceallevel,
concealcursor, and winfixheight remain as functionally required.
* feat: time-aware due dates, persistent undo, @return audit
Problem: Due dates had no time component, the undo stack was lost on
restart and stored in a separate file, and many public functions lacked
required @return annotations.
Solution: Add YYYY-MM-DDThh:mm support across parse, views, recur,
complete, and init with time-aware overdue checks. Merge the undo stack
into the task store JSON so a single file holds all state. Add @return
nil annotations to all 27 void public functions across every module.
* feat(parse): flexible time parsing for @ suffix
Problem: the @HH:MM time suffix required zero-padded 24-hour format,
forcing users to write due:tomorrow@14:00 instead of due:tomorrow@2pm.
Solution: add normalize_time() that accepts bare hours (9, 14),
H:MM (9:30), am/pm (2pm, 9:30am, 12am), and existing HH:MM format,
normalizing all to canonical HH:MM on save.
* feat(complete): add info descriptions to omnifunc items
Problem: completion menu items had no description, making it hard to
distinguish between similar entries like date shorthands and recurrence
patterns.
Solution: return { word, info } tables from date_completions() and
recur_completions(), surfacing human-readable descriptions in the
completion popup.
* ci: format
This commit is contained in:
parent
72dbf037c7
commit
c57cc0845b
12 changed files with 580 additions and 158 deletions
|
|
@ -37,10 +37,12 @@ function M.current_view_name()
|
|||
return current_view
|
||||
end
|
||||
|
||||
---@return nil
|
||||
function M.clear_winid()
|
||||
task_winid = nil
|
||||
end
|
||||
|
||||
---@return nil
|
||||
function M.close()
|
||||
if not task_winid or not vim.api.nvim_win_is_valid(task_winid) then
|
||||
task_winid = nil
|
||||
|
|
@ -86,6 +88,7 @@ local function setup_syntax(bufnr)
|
|||
end
|
||||
|
||||
---@param above boolean
|
||||
---@return nil
|
||||
function M.open_line(above)
|
||||
local bufnr = task_bufnr
|
||||
if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
|
||||
|
|
@ -212,6 +215,7 @@ local function restore_folds(bufnr)
|
|||
end
|
||||
|
||||
---@param bufnr? integer
|
||||
---@return nil
|
||||
function M.render(bufnr)
|
||||
bufnr = bufnr or task_bufnr
|
||||
if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
|
||||
|
|
@ -256,6 +260,7 @@ function M.render(bufnr)
|
|||
restore_folds(bufnr)
|
||||
end
|
||||
|
||||
---@return nil
|
||||
function M.toggle_view()
|
||||
if current_view == 'category' then
|
||||
current_view = 'priority'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue