summaryrefslogtreecommitdiff
path: root/runtime/queries
diff options
context:
space:
mode:
authorGokul Soumya2021-12-20 02:47:40 +0000
committerGitHub2021-12-20 02:47:40 +0000
commitf1c634326b83e4c7f9e4a7c8a504e561f602466c (patch)
tree1b4325157cfd6cae40d953538e92a6d4d4d2ffd8 /runtime/queries
parent23091c9d29f575379d01b7011890da044a302433 (diff)
Improve rust syntax highlighting (#1295)
- Highlight fragment specifiers (expr, tt, in macro definitions) with @type. - Highlight attributes as macros
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/rust/highlights.scm7
1 files 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