diff options
author | George Fraser <[email protected]> | 2020-05-13 05:58:51 +0100 |
---|---|---|
committer | George Fraser <[email protected]> | 2020-05-19 06:55:46 +0100 |
commit | 47ce5ea581f3fe53a31e166c5feac6c64a8a97e4 (patch) | |
tree | 37bc450feec198b84ec58f64b72a946ae08758d3 /editors | |
parent | 38e8f35855efac144373c1b5aab3af050e47e594 (diff) |
Color attribute functions
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" |