emacs dreams dashed
I was very excited to notice that emacsformacosx.com was up to Emacs 29, which meant Tree Sitter was availale.
For some reason I decided to try it on js-mode first, by:
M-x treesit-install-language-grammarand accepting the defaults- open a
jsfile andM-x js-ts-mode(the-tsmeans tree sitter, not typescript as I had assumed).
which got me this in *Messages*:
Error during redisplay: (jit-lock-function 112936) signaled (treesit-query-error "Node type error at" 24 "(jsx_opening_element [(nested_identifier (identifier)) (identifier)] @font-lock-function-call-face) (jsx_closing_element [(nested_identifier (identifier)) (identifier)] @font-lock-function-call-face) (jsx_self_closing_element [(nested_identifier (identifier)) (identifier)] @font-lock-function-call-face) (jsx_attribute (property_identifier) @font-lock-constant-face)" "Debug the query with `treesit-query-validate'")
A bit of searching found this, sadly informing me that 1) grammars change in incompataible ways, and at least the C++ one did after the Emacs 29.1 release was cut and, much more sadly, 2) that the grammars are not versioned, and so the way you find out about incompatible changes is random errors like this.
Alas.
Emacs 29.2 will presumably be out in six months or so, based on eyeballing the release history. Once it's out or I snap and build from HEAD, I look forward to trying out treesit-auto, which handles two annoying things, downloading grammars and then using the new modes.