From: Juri Linkov Date: Sat, 11 Jan 2025 17:39:56 +0000 (+0200) Subject: * lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af658f2cef356d6d3908e0e6f8bb310c98a84fc6;p=emacs.git * lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags. (tsx-ts--s-p-query): Bind 'jsx_opening_element' and 'jsx_closing_element' to @jsx to be able to use the < and > syntax for angle brackets in 'tsx-ts--syntax-propertize-captures' (bug#73978). (cherry picked from commit fafcc8458e805e5c7d7785aa7e943bacfadcf79d) --- diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index ac753ed4266..9b2964c5faf 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -658,7 +658,9 @@ at least 3 (which is the default value)." (when (treesit-available-p) (treesit-query-compile 'tsx '(((regex pattern: (regex_pattern) @regexp)) - ((jsx_text) @jsx))))) + ((jsx_text) @jsx) + ((jsx_opening_element) @jsx) + ((jsx_closing_element) @jsx))))) (defun typescript-ts--syntax-propertize (beg end) (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end)))