* feat(config): add icons table with unicode defaults * feat(buffer): render icon overlays from config.icons Problem: status characters ([ ], [x], [!]) and metadata prefixes are hardcoded literals with no user customization. Solution: read config.icons in apply_extmarks and apply overlay extmarks for checkboxes/headers, replace hardcoded recur ↺ with icons.recur, and prefix due/category virt_text with configurable icon characters. * feat(plugin): add PendingTab command and <Plug>(pending-tab) * docs: add icons config, PendingTab recipes, and demo infrastructure Problem: icon customization and auto-start workflow are undocumented; no demo asset exists for the README. Solution: document pending.Icons in vimdoc with nerd font and ASCII recipes, add PendingTab to commands and mappings, add open-on-startup recipe, add demo-init.lua and demo.tape for VHS screenshot generation, add assets/ directory, add README icons section and demo placeholder. * ci: format
39 lines
1.2 KiB
Lua
39 lines
1.2 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',
|
|
icons = {
|
|
pending = '○',
|
|
done = '✓',
|
|
priority = '●',
|
|
header = '▸',
|
|
due = '·',
|
|
recur = '↺',
|
|
category = '#',
|
|
},
|
|
}
|
|
|
|
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()
|