diff options
Diffstat (limited to 'queries/heex/indents.scm')
| -rw-r--r-- | queries/heex/indents.scm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/queries/heex/indents.scm b/queries/heex/indents.scm index e2a08713b..99fc693dc 100644 --- a/queries/heex/indents.scm +++ b/queries/heex/indents.scm @@ -1,11 +1,20 @@ -; HEEx indents like HTML +; HEEx tags, components, and slots indent like HTML [ (component) + (slot) (tag) ] @indent -; Dedent at the end of each tag +; Dedent at the end of each tag, component, and slot [ - (end_tag) (end_component) -] @branch + (end_slot) + (end_tag) +] @branch @dedent + +; Self-closing tags and components should not change +; indentation level of sibling nodes +[ + (self_closing_component) + (self_closing_tag) +] @auto |
