From f1d6dd3716b8cdb5caa18d20bcad37db8b535923 Mon Sep 17 00:00:00 2001 From: Jaakko Paju <36770267+JPaju@users.noreply.github.com> Date: Tue, 16 Jan 2024 00:01:23 +0200 Subject: [PATCH] highlight(scala): highlight abstract methods in traits and classes --- 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 67603fdda3ca..f6601249d3f0 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)))