Repository navigation
feat(tasks): add markdown task lists and context badges - #405
Open
JuanFerber wants to merge 12 commits into
Open
JuanFerber wants to merge 12 commits into
JuanFerber wants to merge 12 commits into
Conversation
…teractive toggling - Add markdown checkbox detection ([ ], [/], [x]) and live progress virtual text for TODOs. - Add multiline context line indicators and folding (:TodoToggleFold). - Add interactive task toggling command (:TodoToggle). - Add task progress and context line badges in search pickers (Telescope, Trouble, Quickfix). - Add healthcheck module (:checkhealth todo-comments) and defensive error handling. - Add comprehensive automated test suite.
…er OptionSet error
…d fix eof hang - Canonical checkbox detection for inline comments. - Prevent string literal collisions in print/assert statements. - Atomic block expansion preventing truncated ratio calculations. - Clamped window bounds resolving infinite loop at EOF. - Synchronous re-highlighting eliminating extmark toggle jitter. - Add regression test suites for multi-block stability.
- Add ordered Showcase section with interactive, inline, and search demos. - Include optimized GIF recordings in assets/.
…te badges in quickfix - Add backtick (code span) delimiter tracking to Util.is_inside_string. - Locate matched keyword preceding colon in Highlight.match instead of leftmost unpunctuated substring. - Prevent current_block tracking and virtual text emission on quickfix buffers, eliminating double badges ([N/M] + virt_text).
…s on continuation lines - Clamp finish and start column offsets to line length for multiline continuation lines. - Set start and finish to the matched column on the current line instead of inheriting previous header column. - Safeguard add_highlight against negative offsets and wrap nvim_buf_set_extmark in pcall.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add markdown task lists, multiline context badges and interactive toggling
🚀 Overview
This Pull Request addresses the longstanding
-- TODO: add support for markdown todoscomment inconfig.luaand enhancestodo-comments.nvimwith:[ ],[/],[x]) withinTODOblocks with live completion ratio ( 1/3 (33%)).const x = 1; // TODO: [ ] task,x = 1 # TODO: [/],int y = 2; // TODO: [x]) with zero false positives on code identifiers or types (T[ ],any[]).:TodoToggleFold) with smart line counting ((+3 lines)shown when folded/hidden) and atomic block lifecycle management.:TodoToggle) to cycle task states ([ ]➔[/]➔[x]➔[ ]) with clean single-space insertion on plain headers and zero extmark jitter....) ensuring badges are always fully visible on the right edge.:checkhealth todo-comments): Audits dependencies, search tool availability, optional plugin integrations, and feature statuses.✨ Features & Architecture
1. Multiline Context & Folding (
highlight.context&highlight.folding)TODO,WARN,NOTE,PERF,FIX, etc.).(+N lines)when the block is folded (▶).:TodoToggleFoldfolds/unfolds context lines with instant visual indicator updates (▼/▶).2. Task Management & Subtasks (
tasks)TODOblocks to avoid false positives on warning or performance notes.[ ](Todo) ➔TodoCheckboxTodo(DiagnosticInfo)[/](Doing) ➔TodoCheckboxDoing(DiagnosticWarn)[x]/[X](Done) ➔TodoCheckboxDone(DiagnosticHint) 2/4 (50%).todo-sign-task-<state>on any line with an active checkbox, seamlessly falling back totodo-sign-TODOfor checkboxless headers.:TodoTogglecycles task states on the current line (supporting inline and standalone comments) and cleanly inserts[ ]on plain comment lines inside a TODO block without double spaces (-- TODO: [ ] task).3. Global Search & Picker Integration
search.luaextracts task and context metrics forQuickFix,LocList,Trouble, andSnacksin a single pass viaTasks.get_block_stats().TODO: Implement auth [2/4 (50%)] [+4 lines].search.badges = false.print("TEST: ...")orassert(x == "TODO:")).4. Health Check (
:checkhealth todo-comments)ripgrepexecutable path,plenary.nvim,telescope.nvim,trouble.nvim,fzf-lua, andnvim-treesitter.⚙️ Configuration Defaults
⌨️ Commands & Keymaps
🧪 Testing & Reliability
[%w_]$boundary check andUtil.is_inside_string) ensure types, arrays, index access expressions (T[ ],any[],arr[ ] = x) and code print statements are never misinterpreted as tasks.pcall). Missing optional plugins will never crash or disrupt editor operations.tests/test_highlight.lua: Validates extmarks, checkbox highlight groups, sign column priority, and virtual text formatting on standalone and inline tasks.tests/test_tasks.lua: Validates state cycle transitions, header spacing normalization, inline task toggles, and block boundary detection.tests/test_folding.lua: Validates folding execution, multi-block atomicity, and dynamic arrow rotation (▼➔▶).tests/test_search.lua: Validates search result processing and unified badge calculation across Lua, Python, and C inline task patterns.