We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9700c95 commit b26733fCopy full SHA for b26733f
crates/rust-analyzer/src/semantic_tokens.rs
@@ -40,7 +40,6 @@ macro_rules! define_semantic_token_types {
40
define_semantic_token_types![
41
(ANGLE, "angle"),
42
(ARITHMETIC, "arithmetic"),
43
- (ATTRIBUTE, "attribute"),
44
(ATTRIBUTE_BRACKET, "attributeBracket"),
45
(BITWISE, "bitwise"),
46
(BOOLEAN, "boolean"),
@@ -53,6 +52,8 @@ define_semantic_token_types![
53
52
(COMMA, "comma"),
54
(COMPARISON, "comparison"),
55
(CONST_PARAMETER, "constParameter"),
+ // FIXME: to be replaced once lsp-types has the upstream version
56
+ (DECORATOR, "decorator"),
57
(DERIVE, "derive"),
58
(DERIVE_HELPER, "deriveHelper"),
59
(DOT, "dot"),
@@ -63,7 +64,6 @@ define_semantic_token_types![
63
64
(LIFETIME, "lifetime"),
65
(LOGICAL, "logical"),
66
(MACRO_BANG, "macroBang"),
- (OPERATOR, "operator"),
67
(PARENTHESIS, "parenthesis"),
68
(PUNCTUATION, "punctuation"),
69
(SELF_KEYWORD, "selfKeyword"),
crates/rust-analyzer/src/to_proto.rs
@@ -558,7 +558,7 @@ fn semantic_token_type_and_modifiers(
558
let mut mods = semantic_tokens::ModifierSet::default();
559
let type_ = match highlight.tag {
560
HlTag::Symbol(symbol) => match symbol {
561
- SymbolKind::Attribute => semantic_tokens::ATTRIBUTE,
+ SymbolKind::Attribute => semantic_tokens::DECORATOR,
562
SymbolKind::Derive => semantic_tokens::DERIVE,
563
SymbolKind::DeriveHelper => semantic_tokens::DERIVE_HELPER,
564
SymbolKind::Module => lsp_types::SemanticTokenType::NAMESPACE,
@@ -613,7 +613,7 @@ fn semantic_token_type_and_modifiers(
613
HlOperator::Arithmetic => semantic_tokens::ARITHMETIC,
614
HlOperator::Logical => semantic_tokens::LOGICAL,
615
HlOperator::Comparison => semantic_tokens::COMPARISON,
616
- HlOperator::Other => semantic_tokens::OPERATOR,
+ HlOperator::Other => lsp_types::SemanticTokenType::OPERATOR,
617
},
618
HlTag::StringLiteral => lsp_types::SemanticTokenType::STRING,
619
HlTag::UnresolvedReference => semantic_tokens::UNRESOLVED_REFERENCE,
0 commit comments