diff options
Diffstat (limited to 'editors')
-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 d899f60e3..d078f7472 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -604,6 +604,10 @@ | |||
604 | ], | 604 | ], |
605 | "semanticTokenModifiers": [ | 605 | "semanticTokenModifiers": [ |
606 | { | 606 | { |
607 | "id": "attribute", | ||
608 | "description": "Style for elements within attributes" | ||
609 | }, | ||
610 | { | ||
607 | "id": "constant", | 611 | "id": "constant", |
608 | "description": "Style for compile-time constants" | 612 | "description": "Style for compile-time constants" |
609 | }, | 613 | }, |
@@ -630,6 +634,9 @@ | |||
630 | "attribute": [ | 634 | "attribute": [ |
631 | "meta.attribute.rust" | 635 | "meta.attribute.rust" |
632 | ], | 636 | ], |
637 | "function.attribute": [ | ||
638 | "entity.name.function.attribute.rust" | ||
639 | ], | ||
633 | "builtinType": [ | 640 | "builtinType": [ |
634 | "support.type.primitive.rust" | 641 | "support.type.primitive.rust" |
635 | ], | 642 | ], |
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" |