Finding text by scope in buffer


Is it possible to find/manipulate text by scope for a document? For example I would like to get ranges for all text marked with heading scope in a markdown document and get text ranges for those.


There isn’t an API for this at this point. Long-term it is something that we want to provide though I don’t have an ETA for when that might be.


Bummer, does that mean there isn’t even an ‘unofficial’ way to do it - maybe undocumented api? Seems a bit of a shame to re-parse a document looking for regions when that information is already sitting there with the scopes.