Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | crates/ide/src/syntax_highlighting/tags.rs | 2 | ||||
| -rw-r--r-- | crates/rust-analyzer/src/lsp/semantic_tokens.rs | 6 | ||||
| -rw-r--r-- | editors/code/package.json | 38 |
3 files changed, 37 insertions, 9 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs index 379f20e70e..e329023606 100644 --- a/crates/ide/src/syntax_highlighting/tags.rs +++ b/crates/ide/src/syntax_highlighting/tags.rs @@ -226,8 +226,8 @@ impl HlMod { HlMod::IntraDocLink, HlMod::Library, HlMod::Macro, - HlMod::ProcMacro, HlMod::Mutable, + HlMod::ProcMacro, HlMod::Public, HlMod::Reference, HlMod::Static, diff --git a/crates/rust-analyzer/src/lsp/semantic_tokens.rs b/crates/rust-analyzer/src/lsp/semantic_tokens.rs index 15e1e82737..991c10743f 100644 --- a/crates/rust-analyzer/src/lsp/semantic_tokens.rs +++ b/crates/rust-analyzer/src/lsp/semantic_tokens.rs @@ -72,7 +72,7 @@ define_semantic_token_types![ (BRACE, "brace"), (BRACKET, "bracket"), (BUILTIN_ATTRIBUTE, "builtinAttribute") => DECORATOR, - (BUILTIN_TYPE, "builtinType"), + (BUILTIN_TYPE, "builtinType") => TYPE, (CHAR, "character") => STRING, (COLON, "colon"), (COMMA, "comma"), @@ -99,7 +99,7 @@ define_semantic_token_types![ (STATIC, "static") => VARIABLE, (TOOL_MODULE, "toolModule") => DECORATOR, (TYPE_ALIAS, "typeAlias") => TYPE, - (UNION, "union") => STRUCT, + (UNION, "union") => TYPE, (UNRESOLVED_REFERENCE, "unresolvedReference"), } ]; @@ -155,7 +155,7 @@ define_semantic_token_modifiers![ (LIBRARY, "library"), (MACRO_MODIFIER, "macro"), (MUTABLE, "mutable"), - (PROC_MACRO_MODIFIER, "proc_macro"), + (PROC_MACRO_MODIFIER, "procMacro"), (PUBLIC, "public"), (REFERENCE, "reference"), (TRAIT_MODIFIER, "trait"), diff --git a/editors/code/package.json b/editors/code/package.json index 3fb001cb44..c387e72a0c 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1935,6 +1935,11 @@ "description": "Style for const generics" }, { + "id": "const", + "description": "Style for consts", + "superType": "variable" + }, + { "id": "derive", "description": "Style for derives", "superType": "attribute" @@ -1980,20 +1985,25 @@ "superType": "punctuation" }, { - "id": "operator", - "description": "Style for operators", - "superType": "punctuation" - }, - { "id": "parenthesis", "description": "Style for ( or )", "superType": "punctuation" }, { + "id": "procMacro", + "description": "Style for proc macro code", + "superType": "macro" + }, + { "id": "punctuation", "description": "Style for generic punctuation" }, { + "id": "operator", + "description": "Style for operators", + "superType": "punctuation" + }, + { "id": "selfKeyword", "description": "Style for the self keyword", "superType": "keyword" @@ -2009,6 +2019,16 @@ "superType": "punctuation" }, { + "id": "static", + "description": "Style for statics", + "superType": "variable" + }, + { + "id": "toolModule", + "description": "Style for tool module attributes", + "superType": "decorator" + }, + { "id": "typeAlias", "description": "Style for type aliases", "superType": "type" @@ -2065,10 +2085,18 @@ "description": "Style for items that are defined outside of the current crate" }, { + "id": "macro", + "description": "Style for tokens inside of macro calls" + }, + { "id": "mutable", "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", "description": "Style for items that are from the current crate and are `pub`" }, |