Properly expand the JSX indentation rules in 'js-ts-mode'
* lisp/progmodes/js.el (js--treesit-indent-rules): Fix 'js-ts-mode' indent bug in JSX expressions. Before this change, treesit indent mechanisms were trying to call this compatibility function like a matching or anchor rule. This resulted in an error when running `indent-for-tab-command` while the cursor was in a JSX expression: treesit--simple-indent-eval: Wrong number of arguments: ((cl-struct-js--pitem-tags ido-cur-list t) nil "Indent rules helper, to handle different releases of tree-sitter-javascript." (Bug#65134)
This commit is contained in:
parent
889cfb42ed
commit
71bc060e40
1 changed files with 1 additions and 1 deletions
|
@ -3474,7 +3474,7 @@ Check if a node type is available, then return the right indent rules."
|
|||
((parent-is "statement_block") parent-bol js-indent-level)
|
||||
|
||||
;; JSX
|
||||
(js-jsx--treesit-indent-compatibility-bb1f97b)
|
||||
,@(js-jsx--treesit-indent-compatibility-bb1f97b)
|
||||
((node-is "jsx_closing_element") parent 0)
|
||||
((match "jsx_element" "statement") parent js-indent-level)
|
||||
((parent-is "jsx_element") parent js-indent-level)
|
||||
|
|
Loading…
Add table
Reference in a new issue