pending.nvim/scripts/demo-init.lua
Barrett Ruth 76aa22472d refactor(config): default icons to ascii (#55)
* refactor(config): default icons to ascii

Problem: default icons used unicode characters (○, ✓, ●, ▸, ·, ↺)
which render poorly in some terminals and font configurations.

Solution: replace defaults with ascii equivalents (-, x, !, >, ., ~).
Users can still override to unicode or nerd font icons via config.

* ci: ignore library type checking
2026-03-04 17:49:30 -05:00

30 lines
1 KiB
Lua

vim.opt.runtimepath:prepend(vim.fn.getcwd())
local tmpdir = vim.fn.tempname()
vim.fn.mkdir(tmpdir, 'p')
vim.g.pending = {
data_path = tmpdir .. '/tasks.json',
}
local store = require('pending.store')
store.load()
local today = os.date('%Y-%m-%d')
local yesterday = os.date('%Y-%m-%d', os.time() - 86400)
local tomorrow = os.date('%Y-%m-%d', os.time() + 86400)
store.add({
description = 'Finish quarterly report',
category = 'Work',
due = tomorrow,
recur = 'monthly',
priority = 1,
})
store.add({ description = 'Review pull requests', category = 'Work' })
store.add({ description = 'Update deployment docs', category = 'Work', status = 'done' })
store.add({ description = 'Buy groceries', category = 'Personal', due = today })
store.add({ description = 'Call dentist', category = 'Personal', due = yesterday, priority = 1 })
store.add({ description = 'Read chapter 5', category = 'Personal' })
store.add({ description = 'Learn a new language', category = 'Someday' })
store.add({ description = 'Plan hiking trip', category = 'Someday' })
store.save()