From: Arsen Arsenović Date: Fri, 14 Jun 2024 23:18:56 +0000 (+0300) Subject: typescript/tsx-ts-mode: Indentation for type parameters X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=660184122612884c8ca3140ca14e01e48ab2641a;p=emacs.git typescript/tsx-ts-mode: Indentation for type parameters * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Add rule for type_parameters. (cherry picked from commit 1079d333ab7cb24b81e7ebc4087d2a11baa0097e) --- diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 74ed6aa2f94..3606a139d50 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -125,6 +125,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "switch_case") parent-bol typescript-ts-mode-indent-offset) ((parent-is "switch_default") parent-bol typescript-ts-mode-indent-offset) ((parent-is "type_arguments") parent-bol typescript-ts-mode-indent-offset) + ((parent-is "type_parameters") parent-bol typescript-ts-mode-indent-offset) ((parent-is ,(rx (or "variable" "lexical") "_" (or "declaration" "declarator"))) typescript-ts-mode--anchor-decl 1) ((parent-is "arguments") parent-bol typescript-ts-mode-indent-offset)