aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/rifleconf/highlights.scm31
-rw-r--r--runtime/queries/rifleconf/injections.scm16
2 files changed, 47 insertions, 0 deletions
diff --git a/runtime/queries/rifleconf/highlights.scm b/runtime/queries/rifleconf/highlights.scm
new file mode 100644
index 000000000..2ac837a3e
--- /dev/null
+++ b/runtime/queries/rifleconf/highlights.scm
@@ -0,0 +1,31 @@
+(comment) @comment @spell
+
+[
+ ","
+ ";"
+] @punctuation.delimiter
+
+[
+ "="
+ (condition_negation)
+] @operator
+
+; mark the string values for items interpreted as regex as string.regexp
+(binary_condition_expression
+ (binary_condition_identifier) @_keyword
+ (identifier) @string.regexp
+ (#any-of? @_keyword "match" "ext" "mime" "name" "path"))
+
+(binary_condition_identifier) @keyword
+
+(unary_condition_identifier) @keyword
+
+(condition_expression
+ (binary_condition_expression
+ (binary_condition_identifier) @keyword
+ (identifier) @number)
+ (#eq? @keyword "number"))
+
+(ask) @function.builtin
+
+(string) @string
diff --git a/runtime/queries/rifleconf/injections.scm b/runtime/queries/rifleconf/injections.scm
new file mode 100644