Improve treesit settings for typescript/tsx-ts-mode (bug#73404)
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Add @font-lock-type-face
for 'internal_module' with 'identifier'.
(typescript-ts-mode--defun-type-regexp): New variable with
"internal_module" and "interface_declaration".
(typescript-ts-mode--defun-name): New function that uses
'js--treesit-defun-name' and adds "internal_module" and
"interface_declaration".
(typescript-ts-mode--simple-imenu-settings): New variable
like in 'js-ts-mode' with "Namespace" and "Interface" sections.
(typescript-ts-mode--outline-predicate): New variable.
(typescript-ts-base-mode): Set treesit-defun-type-regexp to
typescript-ts-mode--defun-type-regexp, treesit-defun-name-function
to typescript-ts-mode--defun-name, treesit-simple-imenu-settings
to typescript-ts-mode--simple-imenu-settings,
treesit-outline-predicate to typescript-ts-mode--outline-predicate.
Use js--regexp-opt-symbol for treesit-thing-settings.
(tsx-ts-mode): For 'sentence' thing use the same nodes as
js--treesit-sentence-nodes. Use js--regexp-opt-symbol for
treesit-thing-settings.
* lisp/progmodes/js.el (js--treesit-sentence-nodes): Add
"jsx_opening_element" and "jsx_closing_element" like in html.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate): Add
outline headings for C++ "namespace_definition" and "class_specifier".
(cherry picked from commit
68def672e61a5b25ec5bdee69493c09d79632ce2)