blob: ea83fdddd72d7fca60795198e8db5e7674edf2fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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.
|