aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Paju2024-01-28 09:18:35 +0000
committerGitHub2024-01-28 09:18:35 +0000
commitee68fd09ac51b613061d6eb0680d8d42cc21260e (patch)
tree0ae789602fec15c9c0d85f4749bbe605466366ba
parent0328fa4d02ff7fcab221fcc6d9051bdafce63a79 (diff)
highlight(scala): highlight abstract methods in traits and classes (#9340)
-rw-r--r--runtime/queries/scala/highlights.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/runtime/queries/scala/highlights.scm b/runtime/queries/scala/highlights.scm
index 40b230ec..4f90bfda 100644
--- a/runtime/queries/scala/highlights.scm
+++ b/runtime/queries/scala/highlights.scm
@@ -57,14 +57,22 @@
(class_definition
body: (template_body
- (function_definition
- name: (identifier) @function.method)))
-(object_definition
- body: (template_body
- (function_definition
- name: (identifier) @function.method)))
+ [
+ (function_definition
+ name: (identifier) @function.method)
+ (function_declaration
+ name: (identifier) @function.method)
+ ]))
(trait_definition
body: (template_body
+ [
+ (function_definition
+ name: (identifier) @function.method)
+ (function_declaration
+ name: (identifier) @function.method)
+ ]))
+(object_definition
+ body: (template_body
(function_definition
name: (identifier) @function.method)))