diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 7 | ||||
-rw-r--r-- | editors/code/rust.tmGrammar.json | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 8f5a06815..578ee8b0e 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -611,6 +611,10 @@ | |||
611 | ], | 611 | ], |
612 | "semanticTokenModifiers": [ | 612 | "semanticTokenModifiers": [ |
613 | { | 613 | { |
614 | "id": "attribute", | ||
615 | "description": "Style for elements within attributes" | ||
616 | }, | ||
617 | { | ||
614 | "id": "constant", | 618 | "id": "constant", |
615 | "description": "Style for compile-time constants" | 619 | "description": "Style for compile-time constants" |
616 | }, | 620 | }, |
@@ -637,6 +641,9 @@ | |||
637 | "attribute": [ | 641 | "attribute": [ |
638 | "meta.attribute.rust" | 642 | "meta.attribute.rust" |
639 | ], | 643 | ], |
644 | "function.attribute": [ | ||
645 | "entity.name.function.attribute.rust" | ||
646 | ], | ||
640 | "builtinType": [ | 647 | "builtinType": [ |
641 | "support.type.primitive.rust" | 648 | "support.type.primitive.rust" |
642 | ], | 649 | ], |
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index aa0811326..cdcd557dc 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json | |||
@@ -75,8 +75,13 @@ | |||
75 | { | 75 | { |
76 | "comment": "Attribute", | 76 | "comment": "Attribute", |
77 | "name": "meta.attribute.rust", | 77 | "name": "meta.attribute.rust", |
78 | "begin": "#\\!?\\[", | 78 | "begin": "#\\!?\\[(\\w*)", |
79 | "end": "\\]", | 79 | "end": "\\]", |
80 | "captures": { | ||
81 | "1": { | ||
82 | "name": "entity.name.function.attribute.rust" | ||
83 | } | ||
84 | }, | ||
80 | "patterns": [ | 85 | "patterns": [ |
81 | { | 86 | { |
82 | "include": "#string_literal" | 87 | "include": "#string_literal" |