Made it an operator with controlFlow modifier.
INT_NUMBER | FLOAT_NUMBER => HighlightTag::NumericLiteral.into(),
BYTE => HighlightTag::ByteLiteral.into(),
CHAR => HighlightTag::CharLiteral.into(),
+ QUESTION => Highlight::new(HighlightTag::Operator) | HighlightModifier::ControlFlow,
LIFETIME => {
let h = Highlight::new(HighlightTag::Lifetime);
match element.parent().map(|it| it.kind()) {
Local,
UnresolvedReference,
FormatSpecifier,
+ Operator,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
HighlightTag::Local => "variable",
HighlightTag::UnresolvedReference => "unresolved_reference",
HighlightTag::FormatSpecifier => "format_specifier",
+ HighlightTag::Operator => "operator",
}
}
}
HighlightTag::Keyword => lsp_types::SemanticTokenType::KEYWORD,
HighlightTag::UnresolvedReference => semantic_tokens::UNRESOLVED_REFERENCE,
HighlightTag::FormatSpecifier => semantic_tokens::FORMAT_SPECIFIER,
+ HighlightTag::Operator => lsp_types::SemanticTokenType::OPERATOR,
};
for modifier in highlight.modifiers.iter() {