diff options
Diffstat (limited to 'vendor/queries/html/indents.scm')
| -rw-r--r-- | vendor/queries/html/indents.scm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/queries/html/indents.scm b/vendor/queries/html/indents.scm new file mode 100644 index 00000000..ea83fddd --- /dev/null +++ b/vendor/queries/html/indents.scm @@ -0,0 +1,20 @@ +; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389: +; runtime/queries/html/indents.scm. +; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE, +; https://mozilla.org/MPL/2.0/). + +; Indent the contents of an element; pull the end tag — and the close of a +; multi-line start/self-closing tag — back to the element's column. Mirrors the +; jsx rules. Void elements (`<br>`, `<img …>`) are single-line `element`s, so the +; tail-scoped indent is a no-op for them. +[ + (element) + (script_element) + (style_element) +] @indent +(end_tag) @outdent +(start_tag ">" @outdent) +(self_closing_tag "/>" @outdent) + +; <script>/<style> bodies are embedded JS/CSS, handled by injection-aware indent +; (the engine indents them with the JS/CSS query). No @opaque needed. |
