aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/ohm/indents.scm
diff options
context:
space:
mode:
authorNovus Nota2024-03-24 22:30:59 +0000
committerGitHub2024-03-24 22:30:59 +0000
commit2d9e336f640cccdd347e35289c3e4c0371777a3f (patch)
tree4c0459834ad0796de350b169aa9e6d1da4996e27 /runtime/queries/ohm/indents.scm
parent47995bfb0cf3b0bc232a87340c7a01ff26d45bbc (diff)
feat: Add `Ohm` language support (#9991)
* feat: Add `Ohm` language support Hope this commit makes it into release :) * Update runtime/queries/ohm/highlights.scm Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * chore: final newline --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
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