aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJonas Everaert2022-12-17 19:34:00 +0000
committerGitHub2022-12-17 19:34:00 +0000
commitaecb524e503363c2eed2a5a72d8fd881aae18e4b (patch)
treead4d9bdeb1a1758ac07172cd2cbc6be6548169b8 /runtime
parente6a2df8c798537a7dc5aff264eeccc773525aa6c (diff)
Crystal language support (#4993)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/crystal/highlights.scm66
1 files changed, 66 insertions, 0 deletions
diff --git a/runtime/queries/crystal/highlights.scm b/runtime/queries/crystal/highlights.scm
new file mode 100644
index 00000000..33a53e7f
--- /dev/null
+++ b/runtime/queries/crystal/highlights.scm
@@ -0,0 +1,66 @@
+[
+ "class"
+ "struct"
+ "module"
+
+ "def"
+ "alias"
+ "do"
+ "end"
+
+ "require"
+ "include"
+ "extend"
+] @keyword
+
+[
+ "[" "]"
+ "(" ")"
+ "{" "}"
+] @punctuation.bracket
+
+(operator) @operator
+
+(comment) @comment
+
+; literals
+
+(nil) @constant.builtin
+(bool) @constant.builtin.boolean
+
+(integer) @constant.numeric.integer
+(float) @constant.numeric.float
+
+[
+ (string)
+ (char)
+ (commandLiteral)
+] @string
+
+(symbol) @string.special.symbol
+
+(regex) @string.special.regex
+
+; variables
+
+(local_variable) @variable
+
+[
+ (instance_variable)
+ (class_variable)
+] @variable.other.member
+
+(constant) @constant
+
+; type defintitions
+
+(type_identifier) @constructor
+
+; method definition/call
+(identifier) @function.method
+
+; types
+(generic_type) @type
+(union_type) @type
+(type_identifier) @type
+