aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-24 14:32:31 +0100
committerGitHub <[email protected]>2020-05-24 14:32:31 +0100
commitce7144a93d6fe290731cd018da3052d948df4d57 (patch)
tree82669df97be205b4e93418b3200c7d7c26748705 /editors/code
parentea3e84f21d4e8c048e091e865c0916fed62f4714 (diff)
parent47ce5ea581f3fe53a31e166c5feac6c64a8a97e4 (diff)
Merge pull request #4474 from georgewfraser/color_attrs
Color attribute functions
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json7
-rw-r--r--editors/code/rust.tmGrammar.json7
2 files changed, 13 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 1eebe0608..3aa90cd66 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"