Skip to content

Commit 3472105

Browse files
committed
Update semantic token docs
1 parent e4f2d0e commit 3472105

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

crates/ide/src/syntax_highlighting.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ pub struct HlRange {
5757
// - For items:
5858
// +
5959
// [horizontal]
60+
// attribute:: Emitted for attribute macros.
6061
// enum:: Emitted for enums.
6162
// function:: Emitted for free-standing functions.
62-
// macro:: Emitted for macros.
63+
// derive:: Emitted for derive macros.
64+
// macro:: Emitted for function-like macros.
6365
// method:: Emitted for associated functions, also knowns as methods.
6466
// namespace:: Emitted for modules.
6567
// struct:: Emitted for structs.
@@ -90,6 +92,7 @@ pub struct HlRange {
9092
// +
9193
// [horizontal]
9294
// punctuation:: Emitted for general punctuation.
95+
// attributeBracket:: Emitted for attribute invocation brackets, that is the `#[` and `]` tokens.
9396
// angle:: Emitted for `<>` angle brackets.
9497
// brace:: Emitted for `{}` braces.
9598
// bracket:: Emitted for `[]` brackets.
@@ -102,7 +105,6 @@ pub struct HlRange {
102105
// //-
103106
//
104107
// [horizontal]
105-
// attribute:: Emitted for the `#[` `]` tokens.
106108
// builtinAttribute:: Emitted for names to builtin attributes in attribute path, the `repr` in `#[repr(u8)]` for example.
107109
// builtinType:: Emitted for builtin types like `u32`, `str` and `f32`.
108110
// comment:: Emitted for comments.

editors/code/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,11 @@
11261126
"id": "attribute",
11271127
"description": "Style for attributes"
11281128
},
1129+
{
1130+
"id": "attributeBracket",
1131+
"description": "Style for attribute invocation brackets, that is the `#[` and `]` tokens",
1132+
"superType": "punctuation"
1133+
},
11291134
{
11301135
"id": "bitwise",
11311136
"description": "Style for bitwise operators",
@@ -1180,6 +1185,11 @@
11801185
"id": "constParameter",
11811186
"description": "Style for const generics"
11821187
},
1188+
{
1189+
"id": "derive",
1190+
"description": "Style for derives",
1191+
"superType": "attribute"
1192+
},
11831193
{
11841194
"id": "dot",
11851195
"description": "Style for .",

0 commit comments

Comments
 (0)