aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/bash/indents.scm32
-rw-r--r--runtime/queries/ruby/highlights.scm9
2 files changed, 41 insertions, 0 deletions
diff --git a/runtime/queries/bash/indents.scm b/runtime/queries/bash/indents.scm
new file mode 100644
index 000000000..c0a4bed47
--- /dev/null
+++ b/runtime/queries/bash/indents.scm
@@ -0,0 +1,32 @@
+[
+ (if_statement)
+ (for_statement)
+ (while_statement)
+ (case_statement)
+ (function_definition)
+ (compound_statement)
+ (subshell)
+ (command_substitution)
+ (do_group)
+ (case_item)
+] @indent.begin
+
+[
+ "fi"
+ "done"
+ "esac"
+ "}"
+ ")"
+ "then"
+ "do"
+ (elif_clause)
+ (else_clause)
+] @indent.branch
+
+[
+ "fi"
+ "done"
+ "esac"
+ "}"
+ ")"
+] @indent.end
diff --git a/runtime/queries/ruby/highlights.scm b/runtime/queries/ruby/highlights.scm
index 0472df092..5aa518a28 100644
--- a/runtime/queries/ruby/highlights.scm
+++ b/runtime/queries/ruby/highlights.scm
@@ -48,6 +48,9 @@
"then"
] @keyword.conditional
+(in_clause
+ "in" @keyword.conditional)
+
(if
"end" @keyword.conditional)
@@ -61,6 +64,9 @@
"next"
] @keyword.repeat
+(in
+ "in" @keyword.repeat)
+
(constant) @constant
((identifier) @keyword.modifier
@@ -291,6 +297,9 @@
(pair
":" @punctuation.delimiter)
+(keyword_pattern
+ ":" @punctuation.delimiter)
+
[
"("
")"