diff --git a/runtime/queries/scala/highlights.scm b/runtime/queries/scala/highlights.scm index 40b230ec44cc..4f90bfda66b2 100644 --- a/runtime/queries/scala/highlights.scm +++ b/runtime/queries/scala/highlights.scm @@ -57,13 +57,21 @@ (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)))