diff options
| author | George Fraser <george@fivetran.com> | 2020-05-12 21:58:51 -0700 |
|---|---|---|
| committer | George Fraser <george@fivetran.com> | 2020-05-18 22:55:46 -0700 |
| commit | 47ce5ea581f3fe53a31e166c5feac6c64a8a97e4 (patch) | |
| tree | 37bc450feec198b84ec58f64b72a946ae08758d3 /editors/code | |
| parent | 38e8f35855efac144373c1b5aab3af050e47e594 (diff) | |
| download | rust-47ce5ea581f3fe53a31e166c5feac6c64a8a97e4.tar.gz rust-47ce5ea581f3fe53a31e166c5feac6c64a8a97e4.zip | |
Color attribute functions
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 d899f60e333..d078f747220 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -604,6 +604,10 @@ ], "semanticTokenModifiers": [ { + "id": "attribute", + "description": "Style for elements within attributes" + }, + { "id": "constant", "description": "Style for compile-time constants" }, @@ -630,6 +634,9 @@ "attribute": [ "meta.attribute.rust" ], + "function.attribute": [ + "entity.name.function.attribute.rust" + ], "builtinType": [ "support.type.primitive.rust" ], diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index aa0811326a0..cdcd557dc17 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json @@ -75,8 +75,13 @@ { "comment": "Attribute", "name": "meta.attribute.rust", - "begin": "#\\!?\\[", + "begin": "#\\!?\\[(\\w*)", "end": "\\]", + "captures": { + "1": { + "name": "entity.name.function.attribute.rust" + } + }, "patterns": [ { "include": "#string_literal" |
