Subject: 29.1.90; No tsx syntax highlithting in typescript-ts-mode

From: Roman Rudakov <[email-masked]>
Date: Fri, 20 Oct 2023 12:13:15 +0200

- install the latest typescript/tsx grammar.
- open a .tsx source file

I'm getting the following error in the *Messages* buffer:

Error during redisplay: (jit-lock-function 1) signaled 
(treesit-query-error "Structure error at" 22 "(jsx_opening_element 
[(nested_identifier (identifier)) (identifier)] 
@typescript-ts-jsx-tag-face) (jsx_closing_element [(nested_identifier 
(identifier)) (identifier)] @typescript-ts-jsx-tag-face) 
(jsx_self_closing_element [(nested_identifier (identifier)) 
(identifier)] @typescript-ts-jsx-tag-face) (jsx_attribute 
(property_identifier) @typescript-ts-jsx-attribute-face)" "Debug the 
query with `treesit-query-validate'")

In GNU Emacs 29.1.90 (build 1, aarch64-apple-darwin23.0.0, NS
 appkit-2487.00 Version 14.0 (Build 23A344)) of 2023-10-20 built on
 Romans-MBP.home
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.0

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
 --infodir=/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/info/emacs
 --prefix=/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c --with-xml2
 --with-gnutls --with-native-compilation --without-compress-install
 --without-dbus --without-imagemagick --with-modules --with-rsvg
 --without-pop --with-xwidgets --with-ns --disable-ns-self-contained
 'CFLAGS=-Os -w -pipe -mmacosx-version-min=14
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
 -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
 'CPPFLAGS=-I/opt/homebrew/opt/zlib/include
 -I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/readline/include
 -I/opt/homebrew/opt/icu4c/include -isystem/opt/homebrew/include
 -F/opt/homebrew/Frameworks
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
 'LDFLAGS=-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib
 -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/icu4c/lib
 -L/opt/homebrew/lib -F/opt/homebrew/Frameworks
 -Wl,-headerpad_max_install_names
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
 -L/opt/homebrew/opt/libgccjit/lib''
Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS ZLIB
Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Lisp Interaction

Minor modes in effect:
  corfu-popupinfo-mode: t
  pdf-occur-global-minor-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-log-mode: t
  erc-netsplit-mode: t
  erc-autoaway-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-networks-mode: t
  mu4e-column-faces-mode: t
  mu4e-modeline-mode: t
  TeX-PDF-mode: t
  csv-field-index-mode: t
  auto-insert-mode: t
  flymake-mode: t
  idle-highlight-mode: t
  dtrt-indent-mode: t
  yas-minor-mode: t
  paredit-mode: t
  smartparens-global-strict-mode: t
  smartparens-strict-mode: t
  smartparens-mode: t
  magit-todos-mode: t
  hl-todo-mode: t
  global-diff-hl-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  winum-mode: t
  org-roam-db-autosync-mode: t
  global-corfu-mode: t
  corfu-mode: t
  vertico-multiform-mode: t
  vertico-mode: t
  minions-mode: t
  save-place-mode: t
  savehist-mode: t
  subword-mode: t
  recentf-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  global-hl-line-mode: t
  delete-selection-mode: t
  outline-minor-mode: t
  override-global-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  hs-minor-mode: t

Load-path shadows:
/Users/rrudakov/.emacs.d/elpa/hydra-0.15.0/lv hides 
/Users/rrudakov/.emacs.d/elpa/lv-0.15.0/lv
/Users/rrudakov/.emacs.d/elpa/ef-themes-1.3.0.0.20231014.41130/theme-loaddefs 
hides /Users/rrudakov/.emacs.d/elpa/modus-themes-4.3.0/theme-loaddefs
/Users/rrudakov/.emacs.d/elpa/password-store-20230503.619/password-store 
hides /opt/homebrew/share/emacs/site-lisp/pass/password-store
/Users/rrudakov/.emacs.d/elpa/transient-0.4.3/transient hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/transient
/Users/rrudakov/.emacs.d/elpa/ef-themes-1.3.0.0.20231014.41130/theme-loaddefs 
hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/theme-loaddefs
/Users/rrudakov/.emacs.d/elpa/flymake-1.3.6/flymake hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/progmodes/flymake
/Users/rrudakov/.emacs.d/elpa/project-0.10.0/project hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/progmodes/project
/Users/rrudakov/.emacs.d/elpa/eglot-1.15/eglot hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/progmodes/eglot
/Users/rrudakov/.emacs.d/elpa/eldoc-1.14.0/eldoc hides 
/opt/homebrew/Cellar/emacs-plus@29/HEAD-b99d12c/share/emacs/29.1.90/lisp/emacs-lisp/eldoc

Features:
(shadow emacsbug cursor-sensor checkdoc corfu-popupinfo init babashka
org-git ghub-graphql treepy gsexp ghub url-http url-gw nsm url-auth
literate-calc-mode calc-prog calc-ext gif-screencast
google-translate-smooth-ui google-translate-core-ui popup
google-translate-core google-translate-backend password-store-otp
password-store auth-source-pass nov esxml-query pdf-occur tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc pdf-tools pdf-view jka-compr pdf-cache pdf-info tq
pdf-util pdf-macs ob-restclient restclient elfeed-show elfeed-search
org-duration org-eldoc oc-basic bibtex elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib url-queue xml-query erc-list erc-menu
erc-join erc-ring erc-pcomplete erc-track erc-match erc-log 
erc-netsplit
erc-autoaway erc-hl-nicks erc-button erc-fill erc-stamp erc-goodies 
erc
erc-backend erc-networks erc-common erc-compat erc-loaddefs
mu4e-column-faces inline mu4e-icalendar gnus-icalendar icalendar mu4e
mu4e-org mu4e-notification mu4e-main mu4e-view mu4e-headers 
mu4e-compose
mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks
mu4e-mark mu4e-message flow-fill mu4e-contacts mu4e-update 
mu4e-folders
mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars
mu4e-helpers mu4e-config mu4e-window ido mu4e-obsolete rust-ts-mode
dockerfile-ts-mode smartparens-lua lua-mode groovy-mode yaml-ts-mode
smartparens-haskell haskell-mode haskell-cabal haskell-utils
haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support etags fileloop dabbrev
haskell-customize latex-mode-expansions smartparens-latex latex
latex-flymake tex-ispell tex-style font-latex tex texmathp
pip-requirements py-yapf blacken pyvenv eshell esh-cmd esh-ext esh-opt
esh-proc esh-io esh-arg esh-module esh-groups esh-util
web-mode-expansions web-mode disp-table typescript-ts-mode
js-mode-expansions smartparens-javascript js google-java-format
cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds 
cc-styles
cc-align cc-engine cc-vars cc-defs add-node-modules-path prettier-js
clj-refactor hydra lv inflections cider tramp-sh cider-debug
cider-browse-ns cider-mode cider-xref-backend cider-find 
cider-inspector
cider-completion cider-profile cider-eval cider-jar arc-mode
archive-mode cider-repl-history pulse cider-repl cider-resolve
cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec
cider-clojuredocs cider-eldoc cider-docstring cider-client 
cider-common
cider-completion-context cider-connection cider-util cider-popup
sesman-browser nrepl-client queue nrepl-dict spinner parseedn
parseclj-parser parseclj-lex parseclj-alist clojure-mode-expansions
smartparens-clojure sesman clojure-mode lisp-mnt align java-ts-mode
c-ts-common sql-indent sql view pkgbuild-mode sh-script smie 
executable
logview datetime extmap bindat vlf-setup vlf vlf-base vlf-tune 
csv-mode
sort nginx-mode vimrc-mode ssh-config-mode xml-format reformatter
nxml-mode-expansions rng-nxml rng-valid nxml-mode nxml-outln nxml-rap
html-mode-expansions smartparens-html sgml-mode facemenu
smartparens-markdown markdown-mode edit-indirect color eglot
external-completion jsonrpc ert debug backtrace google-c-style bicycle
hideshow autoinsert flymake-kondor consult flymake-proc flymake
idle-highlight-mode dtrt-indent yasnippet rg rg-info-hack rg-menu
rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext avy
flyspell-correct expand-region subword-mode-expansions
text-mode-expansions the-org-mode-expansions
python-el-fgallina-expansions er-basic-expansions expand-region-core
expand-region-custom multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop 
mc-mark-more
mc-cycle-cursors mc-edit-lines multiple-cursors-core paredit
smartparens-rust smartparens-org smartparens-config smartparens-text
smartparens-python smartparens cl git-link thingatpt 
gitignore-templates
magit-todos pcre2el rxt ef-melissa-dark-theme ef-themes hl-todo f
f-shortdoc s grep diff-hl log-view vc-dir ewoc vc vc-dispatcher
magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch 
magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func magit-diff smerge-mode diff diff-mode git-commit log-edit
pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor server magit-mode transient
edmacro kmacro magit-git magit-utils crm winum comp comp-cstr warnings
org-roam-migrate org-roam-log org-roam-mode org-roam-capture 
org-roam-id
org-roam-node org-roam-db emacsql-sqlite-builtin sqlite org-roam-utils
org-roam-compat org-roam org-capture org-attach emacsql-sqlite
emacsql-sqlite-common emacsql emacsql-compiler magit-section
org-tree-slide face-remap org-timer async ob-async ob-plantuml 
ob-ditaa
ob-clojure ob-haskell ob-sqlite ob-shell ob-sql ob-python python pcase
treesit org-clock appt diary-lib diary-loaddefs ox-jira ox-confluence
org-contrib ox-slack ox-gfm ox-md ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox
org-agenda org-element org-persist org-id org-refile avl-tree 
generator
ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime 
smime
dig gnus-sum shr-tag-pre-highlight language-detection shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int
gnus-range message sendmail yank-media rfc822 mml mml-sec epa derived
epg rfc6068 mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util mail-utils range mm-util mail-prsvr alert log4e
notifications dbus xml gntp exec-path-from-shell cape corfu
vertico-directory vertico-multiform vertico minions compat hippie-exp
bookmark re-builder advice flyspell ispell calc calc-loaddefs rect
calc-macs dired-subtree dired-hacks-utils dash dired-git-info
image-dired image-dired-tags image-dired-external image-dired-util xdg
dired-aux xref project saveplace savehist compile text-property-search
ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help 
ediff-init
ediff-util cap-words superword subword ibuffer ibuffer-loaddefs imenu
epg-config recentf tree-widget autorevert filenotify tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
parse-time iso8601 image-mode dired dired-loaddefs exif conf-mode
hl-line gnutls puny delsel novice cl-extra help-mode mysecret org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint
org-pcomplete pcomplete comint ansi-osc ansi-color ring org-list
org-footnote org-faces org-entities time-date noutline outline
ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar
cal-loaddefs org-version org-compat org-macs format-spec use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
cus-edit pp cus-load icons wid-edit add-node-modules-path-autoloads
alert-autoloads auctex-autoloads tex-site avy-autoloads
bicycle-autoloads blacken-autoloads cape-autoloads
clj-refactor-autoloads cider-autoloads clojure-mode-autoloads
consult-autoloads corfu-autoloads csv-mode-autoloads diff-hl-autoloads
dired-git-info-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads dtrt-indent-autoloads
edit-indirect-autoloads ef-themes-autoloads eglot-autoloads
elfeed-autoloads emacs-everywhere-autoloads erc-hl-nicks-autoloads
exec-path-from-shell-autoloads expand-region-autoloads 
flymake-autoloads
eldoc-autoloads flymake-kondor-autoloads flyspell-correct-autoloads
ghub-autoloads gif-screencast-autoloads git-link-autoloads
gitignore-templates-autoloads gntp-autoloads google-c-style-autoloads
google-translate-autoloads groovy-mode-autoloads 
haskell-mode-autoloads
hydra-autoloads idle-highlight-mode-autoloads inflections-autoloads
literate-calc-mode-autoloads log4e-autoloads logview-autoloads
datetime-autoloads extmap-autoloads lua-mode-autoloads lv-autoloads
magit-todos-autoloads magit-autoloads git-commit-autoloads
hl-todo-autoloads f-autoloads markdown-mode-autoloads 
minions-autoloads
modus-themes-autoloads mu4e-column-faces-autoloads
multiple-cursors-autoloads nginx-mode-autoloads nov-autoloads
esxml-autoloads kv-autoloads ob-async-autoloads async-autoloads
ob-restclient-autoloads org-contrib-autoloads org-roam-autoloads
magit-section-autoloads emacsql-autoloads org-tree-slide-autoloads
ox-jira-autoloads ox-slack-autoloads ox-gfm-autoloads 
paredit-autoloads
parseedn-autoloads parseclj-autoloads password-store-otp-autoloads
password-store-autoloads pcre2el-autoloads pdf-tools-autoloads
pip-requirements-autoloads rx pkgbuild-mode-autoloads
plantuml-mode-autoloads popup-autoloads prettier-js-autoloads
project-autoloads py-yapf-autoloads pyvenv-autoloads queue-autoloads
rainbow-mode-autoloads restclient-autoloads rg-autoloads s-autoloads
sesman-autoloads shr-tag-pre-highlight-autoloads
language-detection-autoloads smartparens-autoloads spinner-autoloads
sql-indent-autoloads ssh-config-mode-autoloads tablist-autoloads
transient-autoloads treepy-autoloads vertico-autoloads
vimrc-mode-autoloads vlf-autoloads web-mode-autoloads wgrep-autoloads
winum-autoloads dash-autoloads with-editor-autoloads info
compat-autoloads xml-format-autoloads reformatter-autoloads
yasnippet-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl 
tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks 
lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode 
register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet 
lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj 
charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray 
oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable 
backquote
threads xwidget-internal kqueue cocoa ns lcms2 multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 1223899 100483)
 (symbols 48 79529 41)
 (strings 32 346265 51837)
 (string-bytes 1 10766694)
 (vectors 16 324423)
 (vector-slots 8 3933637 344067)
 (floats 8 91632 471)
 (intervals 56 1974 484)
 (buffers 984 15))

-- 
Best regards, Roman