bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64647: treesit-query-error due to a recent change to tree-sitter-jav


From: Vincenzo Pupillo
Subject: bug#64647: treesit-query-error due to a recent change to tree-sitter-javascript grammar definition
Date: Sat, 15 Jul 2023 14:34:29 +0200

Hi, 
this commit (bb1f97b643b77fc1f082d621bf533b4b14cf0c30) changed the definition 
of the JSX grammar to tree-sitter-javascript. This causes a node type error:
"
Error while displaying: (jit-lock-function 1) reported (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'")
"
Indentation also has problems due to the deletion of "jsx_fragment" definition.

The patch in attachment fixes both problems.
Thank you
Vincenzo

p.s. nvim-treesitter tries to limit these problems by indicating which commit 
to install. Does it make sense to try a similar approach with emacs as well? 

Attachment: 0001-Updated-JSX-support-due-to-changes-in-tree-sitter-ja.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]