summaryrefslogtreecommitdiff
path: root/vendor/queries/zig/indents.scm
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/zig/indents.scm')
-rw-r--r--vendor/queries/zig/indents.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/queries/zig/indents.scm b/vendor/queries/zig/indents.scm
new file mode 100644
index 00000000..2173e029
--- /dev/null
+++ b/vendor/queries/zig/indents.scm
@@ -0,0 +1,22 @@
+; Adapted from helix (https://github.com/helix-editor/helix) at 278b24389:
+; runtime/queries/zig/indents.scm, MODIFIED for the zig grammar pardes
+; builds (maxxnino/tree-sitter-zig), whose node names differ from the
+; tree-sitter-grammars one helix uses: block is Block, switch_expression
+; SwitchExpr, initializer_list InitList, error_set_declaration ErrorSetDecl,
+; and struct/enum/union_declaration are one ContainerDecl.
+; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
+; https://mozilla.org/MPL/2.0/).
+
+[
+ (Block)
+ (SwitchExpr)
+ (InitList)
+ (ContainerDecl)
+ (ErrorSetDecl)
+] @indent
+
+[
+ "}"
+ "]"
+ ")"
+] @outdent