Adjust package.json semantic highlighting items

This commit is contained in:
Lukas Wirth 2024-04-15 17:00:03 +02:00
parent 6b98e55dbb
commit 597c293a69
3 changed files with 37 additions and 9 deletions

View file

@ -226,8 +226,8 @@ impl HlMod {
HlMod::IntraDocLink, HlMod::IntraDocLink,
HlMod::Library, HlMod::Library,
HlMod::Macro, HlMod::Macro,
HlMod::ProcMacro,
HlMod::Mutable, HlMod::Mutable,
HlMod::ProcMacro,
HlMod::Public, HlMod::Public,
HlMod::Reference, HlMod::Reference,
HlMod::Static, HlMod::Static,

View file

@ -72,7 +72,7 @@ define_semantic_token_types![
(BRACE, "brace"), (BRACE, "brace"),
(BRACKET, "bracket"), (BRACKET, "bracket"),
(BUILTIN_ATTRIBUTE, "builtinAttribute") => DECORATOR, (BUILTIN_ATTRIBUTE, "builtinAttribute") => DECORATOR,
(BUILTIN_TYPE, "builtinType"), (BUILTIN_TYPE, "builtinType") => TYPE,
(CHAR, "character") => STRING, (CHAR, "character") => STRING,
(COLON, "colon"), (COLON, "colon"),
(COMMA, "comma"), (COMMA, "comma"),
@ -99,7 +99,7 @@ define_semantic_token_types![
(STATIC, "static") => VARIABLE, (STATIC, "static") => VARIABLE,
(TOOL_MODULE, "toolModule") => DECORATOR, (TOOL_MODULE, "toolModule") => DECORATOR,
(TYPE_ALIAS, "typeAlias") => TYPE, (TYPE_ALIAS, "typeAlias") => TYPE,
(UNION, "union") => STRUCT, (UNION, "union") => TYPE,
(UNRESOLVED_REFERENCE, "unresolvedReference"), (UNRESOLVED_REFERENCE, "unresolvedReference"),
} }
]; ];
@ -155,7 +155,7 @@ define_semantic_token_modifiers![
(LIBRARY, "library"), (LIBRARY, "library"),
(MACRO_MODIFIER, "macro"), (MACRO_MODIFIER, "macro"),
(MUTABLE, "mutable"), (MUTABLE, "mutable"),
(PROC_MACRO_MODIFIER, "proc_macro"), (PROC_MACRO_MODIFIER, "procMacro"),
(PUBLIC, "public"), (PUBLIC, "public"),
(REFERENCE, "reference"), (REFERENCE, "reference"),
(TRAIT_MODIFIER, "trait"), (TRAIT_MODIFIER, "trait"),

View file

@ -1934,6 +1934,11 @@
"id": "constParameter", "id": "constParameter",
"description": "Style for const generics" "description": "Style for const generics"
}, },
{
"id": "const",
"description": "Style for consts",
"superType": "variable"
},
{ {
"id": "derive", "id": "derive",
"description": "Style for derives", "description": "Style for derives",
@ -1979,20 +1984,25 @@
"description": "Style for the ! token of macro calls", "description": "Style for the ! token of macro calls",
"superType": "punctuation" "superType": "punctuation"
}, },
{
"id": "operator",
"description": "Style for operators",
"superType": "punctuation"
},
{ {
"id": "parenthesis", "id": "parenthesis",
"description": "Style for ( or )", "description": "Style for ( or )",
"superType": "punctuation" "superType": "punctuation"
}, },
{
"id": "procMacro",
"description": "Style for proc macro code",
"superType": "macro"
},
{ {
"id": "punctuation", "id": "punctuation",
"description": "Style for generic punctuation" "description": "Style for generic punctuation"
}, },
{
"id": "operator",
"description": "Style for operators",
"superType": "punctuation"
},
{ {
"id": "selfKeyword", "id": "selfKeyword",
"description": "Style for the self keyword", "description": "Style for the self keyword",
@ -2008,6 +2018,16 @@
"description": "Style for ;", "description": "Style for ;",
"superType": "punctuation" "superType": "punctuation"
}, },
{
"id": "static",
"description": "Style for statics",
"superType": "variable"
},
{
"id": "toolModule",
"description": "Style for tool module attributes",
"superType": "decorator"
},
{ {
"id": "typeAlias", "id": "typeAlias",
"description": "Style for type aliases", "description": "Style for type aliases",
@ -2064,10 +2084,18 @@
"id": "library", "id": "library",
"description": "Style for items that are defined outside of the current crate" "description": "Style for items that are defined outside of the current crate"
}, },
{
"id": "macro",
"description": "Style for tokens inside of macro calls"
},
{ {
"id": "mutable", "id": "mutable",
"description": "Style for mutable locals and statics as well as functions taking `&mut self`" "description": "Style for mutable locals and statics as well as functions taking `&mut self`"
}, },
{
"id": "procMacro",
"description": "Style for tokens inside of proc-macro calls"
},
{ {
"id": "public", "id": "public",
"description": "Style for items that are from the current crate and are `pub`" "description": "Style for items that are from the current crate and are `pub`"