Note: Erroneous concealing of to-do status brackets is caused by treesitter markdown parser conceal rules
jakewvincent opened this issue · 3 comments
I'm still having this issue when the state is in progress:
Originally posted by @piersolenski in #110 (comment)
After doing some testing, it looks like it is not the concealing that is built into Mkdnflow that is causing this, but the concealing built into the markdown treesitter parsers. If I disable the treesitter modules and enable link concealing via the Mkdnflow config, the to-do status brackets are (correctly) not concealed. On the other hand, if I disable concealing via the Mkdnflow config, ensure that treesitter and the markdown parsers are installed, and run set cole=2 to enable concealing, the brackets are erroneously concealed. If you have treesitter enabled and the markdown parsers installed, and you only want the concealing provided by Mkdnflow, you'll need to disable treesitter in markdown files or remove the markdown treesitter parsers.
I don't think this is the problem with the ts parser conceal rules. It has nothing to do with conceal. The parser doesn't recognize - [-]
as a valid task list item because it is not present in any markdown spec. And this causes conceal issue.
@sarmong It is an "issue" with conceal in that the phenomenon of [-]
being concealed is due to it being matched by whatever pattern/query also matches concealable segments that look similar. I agree that it's not a bug if [-]
is not in any markdown spec.
This is pinned mainly as an FYI -- if anyone wants the expected concealment for in-progress to-do statuses, don't use the treesitter parsers (or else don't use any to-do status symbols other than
and x
).