feat(list): add checkbox completion timestamps#188
Merged
YousefHadder merged 4 commits intomainfrom Dec 28, 2025
Merged
Conversation
Add automatic completion timestamps when checking tasks, similar to
Obsidian-style task tracking. When enabled, checking a checkbox appends
a configurable timestamp to the task line.
Features:
- Four timestamp formats: emoji, comment, dataview, parenthetical
- Configurable date format via os.date() format string
- Option to remove timestamp on uncheck
- Option to update existing timestamp when re-checking
Configuration:
list = {
checkbox_completion = {
enabled = false,
format = "emoji",
date_format = "%Y-%m-%d",
remove_on_uncheck = true,
update_existing = true,
},
}
Closes #186
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds automatic completion timestamps to checkbox toggles, inspired by Obsidian-style task tracking. When a task is checked, a configurable timestamp is automatically appended to the task text. The feature supports four different timestamp formats (emoji, comment, dataview, parenthetical) and provides fine-grained control over timestamp behavior when unchecking or re-checking tasks.
Key Changes:
- Added
checkbox_completionconfiguration with 5 options:enabled,format,date_format,remove_on_uncheck, andupdate_existing - Extended checkbox toggle logic to conditionally add, update, or remove timestamps based on configuration
- Comprehensive test coverage (25 new tests) for all timestamp formats and configuration options
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/markdown-plus/types.lua | Added LuaCATS type annotations for ListConfig and CheckboxCompletionConfig to define the new configuration structure |
| lua/markdown-plus/init.lua | Added default configuration for list.checkbox_completion with sensible defaults (disabled by default) |
| lua/markdown-plus/config/validate.lua | Added validation for the new list and checkbox_completion config fields, including format enum validation |
| lua/markdown-plus/list/init.lua | Integrated checkbox module setup with list-specific configuration passing |
| lua/markdown-plus/list/checkbox.lua | Implemented core timestamp functionality: format definitions, timestamp generation/removal, and integrated with checkbox toggle logic |
| spec/markdown-plus/config_spec.lua | Added 9 tests validating configuration acceptance and rejection for the new fields |
| spec/markdown-plus/list_spec.lua | Added 16 tests covering all timestamp formats, configuration options, and integration with existing checkbox features |
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.
Summary
Add automatic completion timestamps when checking tasks, similar to Obsidian-style task tracking.
✅ 2025-12-28), comment (<!-- completed: 2025-12-28 -->), dataview ([completion:: 2025-12-28]), parenthetical ((completed: 2025-12-28))os.date()format stringsConfiguration
Example
Test Plan
make checkpasses (lint, format, tests)Closes #186