mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Update injection mechanism and stop injecting through highlight element, switch to more general new highlight tag, generic
This commit is contained in:
parent
d8230acd84
commit
2a56323537
14 changed files with 231 additions and 210 deletions
|
@ -41,8 +41,8 @@ define_semantic_token_types![
|
|||
(ENUM_MEMBER, "enumMember"),
|
||||
(ESCAPE_SEQUENCE, "escapeSequence"),
|
||||
(FORMAT_SPECIFIER, "formatSpecifier"),
|
||||
(GENERIC, "generic"),
|
||||
(LIFETIME, "lifetime"),
|
||||
(PUNCTUATION, "punctuation"),
|
||||
(SELF_KEYWORD, "selfKeyword"),
|
||||
(TYPE_ALIAS, "typeAlias"),
|
||||
(UNION, "union"),
|
||||
|
|
|
@ -295,6 +295,7 @@ fn semantic_token_type_and_modifiers(
|
|||
HighlightTag::SelfType => lsp_types::SemanticTokenType::TYPE,
|
||||
HighlightTag::Field => lsp_types::SemanticTokenType::PROPERTY,
|
||||
HighlightTag::Function => lsp_types::SemanticTokenType::FUNCTION,
|
||||
HighlightTag::Generic => semantic_tokens::GENERIC,
|
||||
HighlightTag::Module => lsp_types::SemanticTokenType::NAMESPACE,
|
||||
HighlightTag::Constant => {
|
||||
mods |= semantic_tokens::CONSTANT;
|
||||
|
@ -323,7 +324,6 @@ fn semantic_token_type_and_modifiers(
|
|||
HighlightTag::UnresolvedReference => semantic_tokens::UNRESOLVED_REFERENCE,
|
||||
HighlightTag::FormatSpecifier => semantic_tokens::FORMAT_SPECIFIER,
|
||||
HighlightTag::Operator => lsp_types::SemanticTokenType::OPERATOR,
|
||||
HighlightTag::Punctuation => semantic_tokens::PUNCTUATION,
|
||||
HighlightTag::EscapeSequence => semantic_tokens::ESCAPE_SEQUENCE,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue