aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)))