Problem: need user-facing :Todo command, buffer-local keymaps, Plug mappings, completion toggle, help float, archive, and syntax highlighting. Solution: add init.lua with command dispatcher, toggle complete/ priority, date prompt, archive purge, and help float. Add plugin/todo.lua entry point with :Todo command and Plug mappings. Add syntax/todo.vim for conceal and priority highlighting.
14 lines
412 B
VimL
14 lines
412 B
VimL
if exists('b:current_syntax')
|
|
finish
|
|
endif
|
|
|
|
syntax match taskId /^\/\d\+\// conceal
|
|
syntax match taskHeader /^\S.*$/ contains=taskId
|
|
syntax match taskPriority /!\ze / contained
|
|
syntax match taskLine /^\/\d\+\/ .*$/ contains=taskId,taskPriority
|
|
|
|
highlight default link taskHeader TodoHeader
|
|
highlight default link taskPriority TodoPriority
|
|
highlight default link taskLine Normal
|
|
|
|
let b:current_syntax = 'task'
|