From e89f79373ec05b42ee0e4c8cf582c7b835c4e2bb Mon Sep 17 00:00:00 2001 From: Philip Miglinci Date: Wed, 25 Feb 2026 12:04:57 +0100 Subject: [PATCH] fix: add indentation for Angular control flow blocks Add indentation rules for Angular 17+ control flow syntax (@if, @else, @for, @empty, @switch, @case, @default, @defer, @placeholder, @loading, @error). The tree-sitter-angular grammar places { and } inside statement_block and switch_body nodes, so targeting these two node types covers all control flow constructs. Closes #74 Co-Authored-By: Claude Opus 4.6 (1M context) --- languages/angular/indents.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/languages/angular/indents.scm b/languages/angular/indents.scm index df1ea73..ffe1e99 100644 --- a/languages/angular/indents.scm +++ b/languages/angular/indents.scm @@ -5,3 +5,7 @@ (element (start_tag) @start (end_tag)? @end) @indent + +; Angular control flow blocks (@if, @for, @switch, @defer, etc.) +(statement_block "{" "}" @end) @indent +(switch_body "{" "}" @end) @indent