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.
This commit is contained in:
parent
9fc24f5239
commit
cd96a269a4
6 changed files with 188 additions and 1 deletions
59
spec/icons_spec.lua
Normal file
59
spec/icons_spec.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
require('spec.helpers')
|
||||
|
||||
local config = require('pending.config')
|
||||
|
||||
describe('icons', function()
|
||||
before_each(function()
|
||||
vim.g.pending = nil
|
||||
config.reset()
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
vim.g.pending = nil
|
||||
config.reset()
|
||||
end)
|
||||
|
||||
it('has default icon values', function()
|
||||
local icons = config.get().icons
|
||||
assert.equals('○', icons.pending)
|
||||
assert.equals('✓', icons.done)
|
||||
assert.equals('●', icons.priority)
|
||||
assert.equals('▸', icons.header)
|
||||
assert.equals('·', icons.due)
|
||||
assert.equals('↺', icons.recur)
|
||||
assert.equals('#', icons.category)
|
||||
end)
|
||||
|
||||
it('allows overriding individual icons', function()
|
||||
vim.g.pending = { icons = { pending = '-', done = 'x' } }
|
||||
config.reset()
|
||||
local icons = config.get().icons
|
||||
assert.equals('-', icons.pending)
|
||||
assert.equals('x', icons.done)
|
||||
assert.equals('●', icons.priority)
|
||||
assert.equals('▸', icons.header)
|
||||
end)
|
||||
|
||||
it('allows overriding all icons', function()
|
||||
vim.g.pending = {
|
||||
icons = {
|
||||
pending = '-',
|
||||
done = 'x',
|
||||
priority = '!',
|
||||
header = '>',
|
||||
due = '@',
|
||||
recur = '~',
|
||||
category = '+',
|
||||
},
|
||||
}
|
||||
config.reset()
|
||||
local icons = config.get().icons
|
||||
assert.equals('-', icons.pending)
|
||||
assert.equals('x', icons.done)
|
||||
assert.equals('!', icons.priority)
|
||||
assert.equals('>', icons.header)
|
||||
assert.equals('@', icons.due)
|
||||
assert.equals('~', icons.recur)
|
||||
assert.equals('+', icons.category)
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue