fix(buffer): conceal in all modes, forge EOL labels, remove dash prefix (#167)
* fix(buffer): keep conceal active in all modes and add `%l` EOL forge labels Problem: `concealcursor` was missing `i` and `v`, so concealed text (task IDs, forge tokens) leaked in insert and visual modes. Forge labels only rendered for the first span when multiple refs existed. Solution: set `concealcursor = 'nicv'` to keep conceal in all modes. Add `%l` EOL format specifier that renders all forge spans with independent highlights. Update default `eol_format` to include `%l`. * refactor: remove `- ` prefix from task line rendering Problem: task lines rendered as `- [ ] description` with a redundant markdown list marker prefix that added visual noise. Solution: render task lines as `[ ] description` instead. Update all line generation in `views.lua`, parsing patterns in `buffer.lua`, `diff.lua`, `textobj.lua`, syntax rules, and corresponding specs.
This commit is contained in:
parent
1266eaedd8
commit
98e4abffc7
12 changed files with 156 additions and 141 deletions
|
|
@ -590,7 +590,7 @@ describe('forge diff integration', function()
|
|||
local tmp = os.tmpname()
|
||||
local s = store.new(tmp)
|
||||
s:load()
|
||||
diff.apply({ '- [ ] Fix bug gh:user/repo#42' }, s)
|
||||
diff.apply({ '[ ] Fix bug gh:user/repo#42' }, s)
|
||||
local tasks = s:active_tasks()
|
||||
assert.equals(1, #tasks)
|
||||
assert.equals('Fix bug gh:user/repo#42', tasks[1].description)
|
||||
|
|
@ -607,7 +607,7 @@ describe('forge diff integration', function()
|
|||
s:load()
|
||||
local task = s:add({ description = 'Fix bug' })
|
||||
s:save()
|
||||
diff.apply({ '/' .. task.id .. '/- [ ] Fix bug gh:user/repo#10' }, s)
|
||||
diff.apply({ '/' .. task.id .. '/[ ] Fix bug gh:user/repo#10' }, s)
|
||||
local updated = s:get(task.id)
|
||||
assert.equals('Fix bug gh:user/repo#10', updated.description)
|
||||
assert.is_not_nil(updated._extra)
|
||||
|
|
@ -634,7 +634,7 @@ describe('forge diff integration', function()
|
|||
},
|
||||
})
|
||||
s:save()
|
||||
diff.apply({ '/' .. task.id .. '/- [ ] Fix bug' }, s)
|
||||
diff.apply({ '/' .. task.id .. '/[ ] Fix bug' }, s)
|
||||
local updated = s:get(task.id)
|
||||
assert.is_not_nil(updated._extra._forge_ref)
|
||||
assert.equals(1, updated._extra._forge_ref.number)
|
||||
|
|
@ -645,7 +645,7 @@ describe('forge diff integration', function()
|
|||
local tmp = os.tmpname()
|
||||
local s = store.new(tmp)
|
||||
s:load()
|
||||
diff.apply({ '- [ ] Check out gh:user/repo' }, s)
|
||||
diff.apply({ '[ ] Check out gh:user/repo' }, s)
|
||||
local tasks = s:active_tasks()
|
||||
assert.equals(1, #tasks)
|
||||
assert.is_not_nil(tasks[1]._extra)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue