From ee68fd09ac51b613061d6eb0680d8d42cc21260e Mon Sep 17 00:00:00 2001 From: Jaakko Paju Date: Sun, 28 Jan 2024 11:18:35 +0200 Subject: highlight(scala): highlight abstract methods in traits and classes (#9340) --- runtime/queries/scala/highlights.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'runtime/queries') 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,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))) -- cgit v1.2.3-70-g09d2