aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/ohm/indents.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/ohm/indents.scm')
-rw-r--r--runtime/queries/ohm/indents.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/runtime/queries/ohm/indents.scm b/runtime/queries/ohm/indents.scm
new file mode 100644
index 00000000..f56119ae
--- /dev/null
+++ b/runtime/queries/ohm/indents.scm
@@ -0,0 +1,37 @@
+; See: https://docs.helix-editor.com/guides/indent.html
+
+; indent
+; ------
+
+[
+ ; <..., ...>
+ (formals)
+ (params)
+
+ ; (...| ...)
+ (alt)
+] @indent
+
+; outdent
+; -------
+
+[
+ "}"
+ ")"
+ ">"
+] @outdent
+
+; align
+; -----
+
+; | ... | ...
+(rule_body
+ . (top_level_term) @anchor
+ (#set! "scope" "tail")) @align
+
+; N/A or unused:
+; --------------
+; indent.always
+; outdent.always
+; extend
+; extend.prevent-once