aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/kotlin
diff options
context:
space:
mode:
authorJoey Hain2023-11-06 01:54:25 +0000
committerGitHub2023-11-06 01:54:25 +0000
commitf73e9a8d15fd5a87d472a49808baf42ba403f9bf (patch)
treec57d8b378ef5877a5f2894b2dc6845b28bffdbbf /runtime/queries/kotlin
parenta98ad137f9b0678ce9770aaa56a8bf8ca7c51d17 (diff)
highlights: add type.parameter scope to several more languages (#8718)
* typescript * go * haskell * ocaml * kotlin (+ bugfix)
Diffstat (limited to 'runtime/queries/kotlin')
-rw-r--r--runtime/queries/kotlin/highlights.scm5
-rw-r--r--runtime/queries/kotlin/locals.scm15
2 files changed, 19 insertions, 1 deletions
diff --git a/runtime/queries/kotlin/highlights.scm b/runtime/queries/kotlin/highlights.scm
index 208a673f..5b19f849 100644
--- a/runtime/queries/kotlin/highlights.scm
+++ b/runtime/queries/kotlin/highlights.scm
@@ -244,7 +244,10 @@
. (identifier)) @namespace
((type_identifier) @type.builtin
- (#match? @function.builtin "^(Byte|Short|Int|Long|UByte|UShort|UInt|ULong|Float|Double|Boolean|Char|String|Array|ByteArray|ShortArray|IntArray|LongArray|UByteArray|UShortArray|UIntArray|ULongArray|FloatArray|DoubleArray|BooleanArray|CharArray|Map|Set|List|EmptyMap|EmptySet|EmptyList|MutableMap|MutableSet|MutableList)$"))
+ (#match? @type.builtin "^(Byte|Short|Int|Long|UByte|UShort|UInt|ULong|Float|Double|Boolean|Char|String|Array|ByteArray|ShortArray|IntArray|LongArray|UByteArray|UShortArray|UIntArray|ULongArray|FloatArray|DoubleArray|BooleanArray|CharArray|Map|Set|List|EmptyMap|EmptySet|EmptyList|MutableMap|MutableSet|MutableList)$"))
+
+(type_parameter
+ (type_identifier) @type.parameter)
(type_identifier) @type
diff --git a/runtime/queries/kotlin/locals.scm b/runtime/queries/kotlin/locals.scm
new file mode 100644
index 00000000..752ed995
--- /dev/null
+++ b/runtime/queries/kotlin/locals.scm
@@ -0,0 +1,15 @@
+; Scopes
+
+[
+ (class_declaration)
+ (function_declaration)
+] @local.scope
+
+; Definitions
+
+(type_parameter
+ (type_identifier) @local.definition)
+
+; References
+
+(type_identifier) @local.reference