From f1c634326b83e4c7f9e4a7c8a504e561f602466c Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Mon, 20 Dec 2021 08:17:40 +0530 Subject: [PATCH] Improve rust syntax highlighting (#1295) - Highlight fragment specifiers (expr, tt, in macro definitions) with @type. - Highlight attributes as macros --- runtime/queries/rust/highlights.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 539d9550..60dd4644 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -242,10 +242,9 @@ ; --- ; Macros ; --- - (meta_item - (identifier) @attribute) -(attribute_item) @attribute + (identifier) @function.macro) + (inner_attribute_item) @attribute (macro_definition @@ -259,7 +258,7 @@ "!" @function.macro) (metavariable) @variable.parameter -(fragment_specifier) @variable.parameter +(fragment_specifier) @type