>> Do we still need such complicated functions as >> mhtml-ts-mode--language-at-point, js--treesit-language-at-point, etc. >> that duplicate the rules from 'treesit-range-rules' >> when now the default language-at-point function could be implemented >> just as >> >> (treesit-parser-language >> (or (seq-some (lambda (o) (overlay-get o 'treesit-parser)) >> (overlays-at (point) t)) >> treesit-primary-parser)) > > Yeah, we can provide a default language-at-point function now that > determines the “most relevant parser” by embed level. But we should keep > treesit-language-at-point-function because a) it’s already in a release > version and b) we want major modes to be able to customize what parser to > pick at any given point. Ok, so here is a complete patch: