Skip to content

Commit 597c293

Browse files
committed
Adjust package.json semantic highlighting items
1 parent 6b98e55 commit 597c293

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
lines changed

crates/ide/src/syntax_highlighting/tags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ impl HlMod {
226226
HlMod::IntraDocLink,
227227
HlMod::Library,
228228
HlMod::Macro,
229-
HlMod::ProcMacro,
230229
HlMod::Mutable,
230+
HlMod::ProcMacro,
231231
HlMod::Public,
232232
HlMod::Reference,
233233
HlMod::Static,

crates/rust-analyzer/src/lsp/semantic_tokens.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ define_semantic_token_types![
7272
(BRACE, "brace"),
7373
(BRACKET, "bracket"),
7474
(BUILTIN_ATTRIBUTE, "builtinAttribute") => DECORATOR,
75-
(BUILTIN_TYPE, "builtinType"),
75+
(BUILTIN_TYPE, "builtinType") => TYPE,
7676
(CHAR, "character") => STRING,
7777
(COLON, "colon"),
7878
(COMMA, "comma"),
@@ -99,7 +99,7 @@ define_semantic_token_types![
9999
(STATIC, "static") => VARIABLE,
100100
(TOOL_MODULE, "toolModule") => DECORATOR,
101101
(TYPE_ALIAS, "typeAlias") => TYPE,
102-
(UNION, "union") => STRUCT,
102+
(UNION, "union") => TYPE,
103103
(UNRESOLVED_REFERENCE, "unresolvedReference"),
104104
}
105105
];
@@ -155,7 +155,7 @@ define_semantic_token_modifiers![
155155
(LIBRARY, "library"),
156156
(MACRO_MODIFIER, "macro"),
157157
(MUTABLE, "mutable"),
158-
(PROC_MACRO_MODIFIER, "proc_macro"),
158+
(PROC_MACRO_MODIFIER, "procMacro"),
159159
(PUBLIC, "public"),
160160
(REFERENCE, "reference"),
161161
(TRAIT_MODIFIER, "trait"),

editors/code/package.json

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,11 @@
19341934
"id": "constParameter",
19351935
"description": "Style for const generics"
19361936
},
1937+
{
1938+
"id": "const",
1939+
"description": "Style for consts",
1940+
"superType": "variable"
1941+
},
19371942
{
19381943
"id": "derive",
19391944
"description": "Style for derives",
@@ -1979,20 +1984,25 @@
19791984
"description": "Style for the ! token of macro calls",
19801985
"superType": "punctuation"
19811986
},
1982-
{
1983-
"id": "operator",
1984-
"description": "Style for operators",
1985-
"superType": "punctuation"
1986-
},
19871987
{
19881988
"id": "parenthesis",
19891989
"description": "Style for ( or )",
19901990
"superType": "punctuation"
19911991
},
1992+
{
1993+
"id": "procMacro",
1994+
"description": "Style for proc macro code",
1995+
"superType": "macro"
1996+
},
19921997
{
19931998
"id": "punctuation",
19941999
"description": "Style for generic punctuation"
19952000
},
2001+
{
2002+
"id": "operator",
2003+
"description": "Style for operators",
2004+
"superType": "punctuation"
2005+
},
19962006
{
19972007
"id": "selfKeyword",
19982008
"description": "Style for the self keyword",
@@ -2008,6 +2018,16 @@
20082018
"description": "Style for ;",
20092019
"superType": "punctuation"
20102020
},
2021+
{
2022+
"id": "static",
2023+
"description": "Style for statics",
2024+
"superType": "variable"
2025+
},
2026+
{
2027+
"id": "toolModule",
2028+
"description": "Style for tool module attributes",
2029+
"superType": "decorator"
2030+
},
20112031
{
20122032
"id": "typeAlias",
20132033
"description": "Style for type aliases",
@@ -2064,10 +2084,18 @@
20642084
"id": "library",
20652085
"description": "Style for items that are defined outside of the current crate"
20662086
},
2087+
{
2088+
"id": "macro",
2089+
"description": "Style for tokens inside of macro calls"
2090+
},
20672091
{
20682092
"id": "mutable",
20692093
"description": "Style for mutable locals and statics as well as functions taking `&mut self`"
20702094
},
2095+
{
2096+
"id": "procMacro",
2097+
"description": "Style for tokens inside of proc-macro calls"
2098+
},
20712099
{
20722100
"id": "public",
20732101
"description": "Style for items that are from the current crate and are `pub`"

0 commit comments

Comments
 (0)