((parent-is "statement_block") parent-bol js-indent-level)
;; JSX
- ((parent-is "jsx_opening_element") parent js-indent-level)
- ((match "<" "jsx_fragment") parent 0)
- ((parent-is "jsx_fragment") parent js-indent-level)
+ ((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_element") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset)
((node-is "jsx_closing_element") parent 0)
- ((node-is "jsx_text") parent js-indent-level)
- ((parent-is "jsx_element") parent js-indent-level)
((node-is "/") parent 0)
- ((parent-is "jsx_self_closing_element") parent js-indent-level)))))
+ ((node-is ">") parent 0)))))
(defvar js--treesit-keywords
'("as" "async" "await" "break" "case" "catch" "class" "const" "continue"
((parent-is "binary_expression") parent-bol typescript-ts-mode-indent-offset)
,@(when (eq language 'tsx)
- `(((parent-is "jsx_opening_element") parent typescript-ts-mode-indent-offset)
- ((match "<" "jsx_fragment") parent 0)
- ((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)
+ `(((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_element") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset)
+ ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset)
((node-is "jsx_closing_element") parent 0)
- ((parent-is "jsx_element") parent typescript-ts-mode-indent-offset)
((node-is "/") parent 0)
- ((parent-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset)))
+ ((node-is ">") parent 0)))
(no-node parent-bol 0))))
(defvar typescript-ts-mode--keywords