From 36692bdffa59accee75e34647d83cbd8190b7906 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Tue, 1 Sep 2020 13:10:23 -0400 Subject: [PATCH] Switch to upstream ENUM_MEMBER --- crates/rust-analyzer/src/semantic_tokens.rs | 2 +- crates/rust-analyzer/src/to_proto.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index 1225d3e35a9..a6c4d6099bc 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs @@ -24,6 +24,7 @@ macro_rules! define_semantic_token_types { SemanticTokenType::CLASS, SemanticTokenType::INTERFACE, SemanticTokenType::ENUM, + SemanticTokenType::ENUM_MEMBER, SemanticTokenType::TYPE_PARAMETER, SemanticTokenType::FUNCTION, SemanticTokenType::MEMBER, @@ -40,7 +41,6 @@ macro_rules! define_semantic_token_types { (ATTRIBUTE, "attribute"), (BOOLEAN, "boolean"), (BUILTIN_TYPE, "builtinType"), - (ENUM_MEMBER, "enumMember"), (ESCAPE_SEQUENCE, "escapeSequence"), (FORMAT_SPECIFIER, "formatSpecifier"), (GENERIC, "generic"), diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 16aab52c2b3..dcbf837d659 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -369,7 +369,7 @@ fn semantic_token_type_and_modifiers( mods |= lsp_types::SemanticTokenModifier::STATIC; lsp_types::SemanticTokenType::VARIABLE } - HighlightTag::EnumVariant => semantic_tokens::ENUM_MEMBER, + HighlightTag::EnumVariant => lsp_types::SemanticTokenType::ENUM_MEMBER, HighlightTag::Macro => lsp_types::SemanticTokenType::MACRO, HighlightTag::ValueParam => lsp_types::SemanticTokenType::PARAMETER, HighlightTag::Local => lsp_types::SemanticTokenType::VARIABLE,