Skip to content

feat: Add 'pending' state to 'task_list_marker' - #254

Closed
riodelphino wants to merge 1 commit into
tree-sitter-grammars:split_parserfrom
riodelphino:feature/add_pending_task_list_marker
Closed

riodelphino wants to merge 1 commit into
tree-sitter-grammars:split_parserfrom
riodelphino:feature/add_pending_task_list_marker

Conversation

@riodelphino

Copy link
Copy Markdown

Summary

Some Neovim plugins treat [-] as a "pending" task state, but tree-sitter-markdown currently has no dedicated marker for it. As a result, [-] falls through to regular paragraph text and gets parsed by the inline grammar as a shortcut link — which then gets concealed by highlight/conceal queries that hide link syntax.

This PR adds a task_list_marker_pending node (mirroring the existing task_list_marker_checked/task_list_marker_unchecked), so [-] is recognized as a task list marker instead of link syntax, and stays visible.

A test for the pending state was added to extension_task_list.txt.

Replaces #182

This replaces my own #182 from ~2 years ago. That branch had gone stale relative to split_parser and could no longer be merged cleanly. This PR is rebuilt from scratch against the current split_parser HEAD.

The full test suite passing locally.

@clason

clason commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

I don't think this is part of the specification that this parser targets, so out of scope.

@riodelphino

Copy link
Copy Markdown
Author

I got it. I'll close this.
I really wish these specifications would incorporate [-] in future(because so may nvim plugins cover it with custom implementations), but I suppose that's difficult😂
Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants