You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the change / addition you'd like to see made
The way the tree-sitter highlighting library works (and by extension, most existing tree-sitter parsers and queries) the tokenisation of a given file is split between highlights (currently implemented in ad), injections and locals as documented here. ad is only aiming for minimal support for highlighting but it looks as though many parsers are written with this set up in mind. tree-sitter-markdown has example bindings showing how to make use of the two parsers it provides but it looks to be somewhat custom rather than the more
generic approach used in helix (see here as well) which I'm still trying to fully wrap my head around. I assume that there is a reason why it isn't as simple as "just" parsing nodes marked as being injections with a different parsers and splicing those tokens into the ones obtained from the parent, but I'll need to look into things further to be sure.
The text was updated successfully, but these errors were encountered:
Please describe the change / addition you'd like to see made
The way the tree-sitter highlighting library works (and by extension, most existing tree-sitter parsers and queries) the tokenisation of a given file is split between highlights (currently implemented in
ad
), injections and locals as documented here.ad
is only aiming for minimal support for highlighting but it looks as though many parsers are written with this set up in mind.tree-sitter-markdown
has example bindings showing how to make use of the two parsers it provides but it looks to be somewhat custom rather than the moregeneric approach used in helix (see here as well) which I'm still trying to fully wrap my head around. I assume that there is a reason why it isn't as simple as "just" parsing nodes marked as being injections with a different parsers and splicing those tokens into the ones obtained from the parent, but I'll need to look into things further to be sure.
The text was updated successfully, but these errors were encountered: