No description
Find a file
Barrett Ruth ee362f7785 fix: harden sync backends and fix edit recompute (#66)
* refactor(oauth): async coroutine support, pure-Lua PKCE, server hardening

Problem: OAuth module shelled out to openssl for PKCE, used blocking
`vim.system():wait()`, had a weak `os.time()` PRNG seed, and the TCP
callback server leaked on read errors with no timeout.

Solution: Add `M.system()` coroutine wrapper and `M.async()` helper,
replace openssl with `vim.fn.sha256` + `vim.base64.encode`, seed from
`vim.uv.hrtime()`, add `close_server()` guard with 120s timeout, and
close the server on read errors.

* fix(gtasks): async operations, error notifications, buffer refresh

Problem: Sync operations blocked the editor, `push_pass` silently
dropped delete/update/create API errors, and the buffer was not
re-rendered after push/pull/sync.

Solution: Wrap `push`, `pull`, `sync` in `oauth.async()`, add
`vim.notify` for all `push_pass` failure paths, and re-render the
pending buffer after each operation.

* fix(init): edit recompute, filter predicates, sync action listing

Problem: `M.edit()` skipped `_recompute_counts()` after saving,
`compute_hidden_ids` lacked `done`/`pending` predicates, and
`run_sync` defaulted to `sync` instead of listing available actions.

Solution: Replace `s:save()` with `_save_and_notify()` in `M.edit()`,
add `done` and `pending` filter predicates, and list backend actions
when no action is specified.

* refactor(gcal): per-category calendars, async push, error notifications

Problem: gcal used a single hardcoded calendar name, ran synchronously
blocking the editor, and silently dropped some API errors.

Solution: Fetch all calendars and map categories to calendars (creating
on demand), wrap push in `oauth.async()`, notify on individual API
failures, track `_gcal_calendar_id` in `_extra`, and remove the `$`
anchor from `next_day` pattern.

* refactor: formatting fixes, config cleanup, health simplification

Problem: Formatter disagreements in `init.lua` and `gtasks.lua`,
stale `calendar` field in gcal config, and redundant health checks
for data directory existence.

Solution: Apply stylua formatting, remove `calendar` field from
`pending.GcalConfig`, drop data-dir and no-file health messages,
add `done`/`pending` to filter tab-completion candidates.

* docs: update vimdoc for sync refactor, remove demo scripts

Problem: Docs still referenced openssl dependency, defaulting to `sync`
action, and the `calendar` config field. Demo scripts used the old
singleton `store` API.

Solution: Update vimdoc and README to reflect explicit actions, per-
category calendars, and pure-Lua PKCE. Remove stale demo scripts and
update sync specs to match new behavior.

* fix(types): correct LuaLS annotations in oauth and gcal
2026-03-05 11:50:13 -05:00
.github doc: minify readme (#24) 2026-02-25 09:40:06 -05:00
doc fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
lua/pending fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
plugin fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
scripts fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
spec fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
syntax refactor: adopt markdown-style checkbox buffer format (#20) 2026-02-24 23:21:55 -05:00
.busted build: add tooling and dev environment configs 2026-02-24 15:08:44 -05:00
.editorconfig build: initial repo scaffold 2026-02-24 15:08:35 -05:00
.gitignore fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
.luarc.json refactor(config): default icons to ascii (#55) 2026-03-04 17:49:30 -05:00
.pre-commit-config.yaml ci: format 2026-02-24 15:17:24 -05:00
flake.lock build: add tooling and dev environment configs 2026-02-24 15:08:44 -05:00
flake.nix ci: nix 2026-03-04 14:07:04 -05:00
LICENSE build: initial repo scaffold 2026-02-24 15:08:35 -05:00
pending.nvim-scm-1.rockspec feat: rename 2026-02-24 15:21:44 -05:00
README.md fix: harden sync backends and fix edit recompute (#66) 2026-03-05 11:50:13 -05:00
selene.toml build: add tooling and dev environment configs 2026-02-24 15:08:44 -05:00
stylua.toml build: add tooling and dev environment configs 2026-02-24 15:08:44 -05:00
vim.yaml build: add tooling and dev environment configs 2026-02-24 15:08:44 -05:00

pending.nvim

Edit tasks like text. :w saves them.

demo

Requirements

  • Neovim 0.10+
  • (Optionally) curl for Google Calendar and Google Task sync

Installation

Install with your package manager of choice or via luarocks:

luarocks install pending.nvim

Documentation

:help pending.nvim

Icons

All display characters are configurable. Defaults produce markdown-style checkboxes ([ ], [x], [!]):

vim.g.pending = {
  icons = {
    pending = ' ', done = 'x', priority = '!',
    due = '.', recur = '~', category = '#',
  },
}

See :help pending.Icons for nerd font examples.

Acknowledgements