From 660184122612884c8ca3140ca14e01e48ab2641a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arsen=20Arsenovi=C4=87?= Date: Sat, 15 Jun 2024 02:18:56 +0300 Subject: [PATCH] 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) --- lisp/progmodes/typescript-ts-mode.el | 1 + 1 file changed, 1 insertion(+) 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) -- 2.39.2