Yuan Fu writes: >>> Ok, so the problem is nested parsers. I don’t think the overlap >>> would >>> cause any problem. Right now treesit-range-settings can only give >>> you >>> one nested layer. I’ll need to make it support nesting a parser >>> inside >>> a local parser of the same language. I’ll work on that once I wrap >>> up >>> the thing I’m working on right now :-) >> >> Thanks, this definetly seems like the problem. Also the >> treesit-range-settings seems kind of unstable, example when I >> purposly >> leave closed string before it, and close the string, it doesn't >> reparse. > > Can you show me a concrete example (reproduce recipe)? I can look into > it. > I attached a video that demostrated it. It also shows a second bug, in which perfomance is exponentially bad because of treesit-font-lock-settings. I've attached all the relevent fiels, and note the long file with horrible perfomance was https://github.com/git/git/blob/master/gitweb/gitweb.perl.