aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/crystal
diff options
context:
space:
mode:
authorMichael Davis2023-01-08 17:12:04 +0000
committerGitHub2023-01-08 17:12:04 +0000
commitb368df57855c77be5f3ae6601f5a83b586feb7c3 (patch)
treec7a17214feb643cb623028de293bd8fe0efce279 /runtime/queries/crystal
parentec639387e8476b0aea75bceff7db4b312305dad2 (diff)
Use tree-sitter-ruby for crystal (#5205)
Diffstat (limited to 'runtime/queries/crystal')
-rw-r--r--runtime/queries/crystal/highlights.scm67
-rw-r--r--runtime/queries/crystal/injections.scm1
-rw-r--r--runtime/queries/crystal/locals.scm1
-rw-r--r--runtime/queries/crystal/textobjects.scm1
4 files changed, 4 insertions, 66 deletions
diff --git a/runtime/queries/crystal/highlights.scm b/runtime/queries/crystal/highlights.scm
index 33a53e7f..57154286 100644
--- a/runtime/queries/crystal/highlights.scm
+++ b/runtime/queries/crystal/highlights.scm
@@ -1,66 +1 @@
-[
- "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
-
+; inherits: ruby
diff --git a/runtime/queries/crystal/injections.scm b/runtime/queries/crystal/injections.scm
new file mode 100644
index 00000000..57154286
--- /dev/null
+++ b/runtime/queries/crystal/injections.scm
@@ -0,0 +1 @@
+; inherits: ruby
diff --git a/runtime/queries/crystal/locals.scm b/runtime/queries/crystal/locals.scm
new file mode 100644
index 00000000..57154286
--- /dev/null
+++ b/runtime/queries/crystal/locals.scm
@@ -0,0 +1 @@
+; inherits: ruby
diff --git a/runtime/queries/crystal/textobjects.scm b/runtime/queries/crystal/textobjects.scm
new file mode 100644
index 00000000..57154286
--- /dev/null
+++ b/runtime/queries/crystal/textobjects.scm
@@ -0,0 +1 @@
+; inherits: ruby