From 045150ee2cf5d246b6aa873469dfe16de0662fc7 Mon Sep 17 00:00:00 2001 From: Jaakko Paju Date: Sun, 28 Jan 2024 11:18:35 +0200 Subject: [PATCH] highlight(scala): highlight abstract methods in traits and classes (#9340) --- runtime/queries/scala/highlights.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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)))